@@ -33,6 +33,7 @@
|
||||
"@backstage/core-plugin-api": "^0.1.2",
|
||||
"@backstage/errors": "^0.1.1",
|
||||
"@backstage/theme": "^0.2.8",
|
||||
"@material-ui/core": "^4.12.2",
|
||||
"@material-ui/icons": "^4.9.1",
|
||||
"@material-ui/lab": "4.0.0-alpha.45",
|
||||
"@testing-library/react-hooks": "^3.4.2",
|
||||
|
||||
@@ -54,7 +54,6 @@ import React, {
|
||||
ReactNode,
|
||||
useCallback,
|
||||
useEffect,
|
||||
useRef,
|
||||
useState,
|
||||
} from 'react';
|
||||
import { CheckboxTreeProps } from '../CheckboxTree/CheckboxTree';
|
||||
@@ -212,6 +211,7 @@ export interface TableProps<T extends object = {}>
|
||||
}
|
||||
|
||||
export function TableToolbar(toolbarProps: {
|
||||
toolbarRef: MutableRefObject<any>;
|
||||
setSearch: (value: string) => void;
|
||||
onSearchChanged: (value: string) => void;
|
||||
toggleFilters: () => void;
|
||||
@@ -219,6 +219,7 @@ export function TableToolbar(toolbarProps: {
|
||||
selectedFiltersLength: number;
|
||||
}) {
|
||||
const {
|
||||
toolbarRef,
|
||||
setSearch,
|
||||
hasFilters,
|
||||
selectedFiltersLength,
|
||||
@@ -246,6 +247,7 @@ export function TableToolbar(toolbarProps: {
|
||||
</div>
|
||||
<StyledMTableToolbar
|
||||
{...toolbarProps}
|
||||
ref={toolbarRef}
|
||||
onSearchChanged={onSearchChanged}
|
||||
/>
|
||||
</div>
|
||||
@@ -253,7 +255,11 @@ export function TableToolbar(toolbarProps: {
|
||||
}
|
||||
|
||||
return (
|
||||
<StyledMTableToolbar {...toolbarProps} onSearchChanged={onSearchChanged} />
|
||||
<StyledMTableToolbar
|
||||
{...toolbarProps}
|
||||
ref={toolbarRef}
|
||||
onSearchChanged={onSearchChanged}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,10 @@
|
||||
*/
|
||||
|
||||
import React, { PropsWithChildren } from 'react';
|
||||
import { createMuiTheme, ThemeProvider } from '@material-ui/core';
|
||||
import {
|
||||
createTheme as createMuiTheme,
|
||||
ThemeProvider,
|
||||
} from '@material-ui/core';
|
||||
import { BackstageTheme } from '@backstage/theme';
|
||||
import {
|
||||
costInsightsDarkTheme,
|
||||
|
||||
Reference in New Issue
Block a user