File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import React, { memo } from "react"
22import Flex from "src/components/templates/flex"
33import SearchInput from "src/components/search"
44import { Icon } from "src/components/icon"
5+ import { H4 } from "@netdata/netdata-ui/lib/components/typography"
56import { debounce } from "throttle-debounce"
67
78const GlobalControls = ( {
@@ -11,6 +12,7 @@ const GlobalControls = ({
1112 searchPlaceholder = "Search" ,
1213 searchValue,
1314 tableMeta,
15+ title,
1416} ) => {
1517 const wordsCount = searchValue ?. split ( " " ) . filter ( x => ! ! x ) . length
1618
@@ -22,8 +24,10 @@ const GlobalControls = ({
2224 zIndex = { 10 }
2325 background = "mainBackground"
2426 padding = { [ 0 , 0 , 4 ] }
27+ gap = { 3 }
2528 { ...tableMeta . bulkActionsStyles }
2629 >
30+ { ! ! title && < H4 > { title } </ H4 > }
2731 { handleSearch && (
2832 < Flex width = { { max : 100 , base : "40%" } } { ...tableMeta . searchContainerStyles } >
2933 < SearchInput
Original file line number Diff line number Diff line change @@ -17,7 +17,6 @@ import useBulkActions from "./features/useBulkActions"
1717import ColumnPinning from "./features/columnPinning"
1818import GlobalControls from "./features/globalControls"
1919import TableProvider from "./features/provider"
20-
2120import MainTable from "./features/mainTable"
2221
2322const noop = ( ) => { }
@@ -66,6 +65,7 @@ const NetdataTable = ({
6665 virtualizeOptions = { } ,
6766 coloredSortedColumn = true ,
6867 meta : tableMeta = { } ,
68+ title,
6969 ...rest
7070} ) => {
7171 const [ columnVisibility , setColumnVisibility ] = useState ( defaultColumnVisibility )
@@ -200,6 +200,7 @@ const NetdataTable = ({
200200 < Flex height = "100%" overflow = "hidden" width = "100%" column >
201201 { onGlobalSearchChange || hasBulkActions ? (
202202 < GlobalControls
203+ title = { title }
203204 bulkActions = { hasBulkActions ? actions : null }
204205 dataGa = { dataGa }
205206 handleSearch = { onGlobalSearchChange ? onGlobalFilterChange : null }
You can’t perform that action at this time.
0 commit comments