Add extraActions fallback to MasterDetai and DataTable
Summary: Old MasterDetail and DataTable (pre-power search) are using `extraActions` prop which no longer exists in teh new components. This diff adds a fallback. Reviewed By: ivanmisuno Differential Revision: D49869730 fbshipit-source-id: 4c1a658aa94acc770836f9bf296a3df7d6cdcb3e
This commit is contained in:
committed by
Facebook GitHub Bot
parent
9d83697168
commit
1e81fe636a
@@ -85,6 +85,7 @@ export function MasterDetailWithPowerSearch<T extends object>({
|
||||
sidebarSize,
|
||||
onSelect,
|
||||
actionsTop,
|
||||
extraActions,
|
||||
enableMenuEntries,
|
||||
enableClear,
|
||||
isPaused,
|
||||
@@ -232,6 +233,7 @@ export function MasterDetailWithPowerSearch<T extends object>({
|
||||
</>
|
||||
}
|
||||
actionsTop={actionsTop}
|
||||
extraActions={extraActions}
|
||||
/>
|
||||
);
|
||||
|
||||
|
||||
@@ -87,6 +87,8 @@ type DataTableBaseProps<T = any> = {
|
||||
scrollable?: boolean;
|
||||
actionsRight?: React.ReactElement;
|
||||
actionsTop?: React.ReactElement;
|
||||
/** @deprecated **/
|
||||
extraActions?: React.ReactElement;
|
||||
onSelect?(record: T | undefined, records: T[]): void;
|
||||
onRowStyle?(record: T): CSSProperties | undefined;
|
||||
tableManagerRef?: RefObject<DataTableManager<T> | undefined>; // Actually we want a MutableRefObject, but that is not what React.createRef() returns, and we don't want to put the burden on the plugin dev to cast it...
|
||||
@@ -663,6 +665,7 @@ export function DataTable<T extends object>(
|
||||
</Dropdown>
|
||||
)}
|
||||
{props.actionsRight}
|
||||
{props.extraActions}
|
||||
</Searchbar>
|
||||
)}
|
||||
</Layout.Container>
|
||||
|
||||
Reference in New Issue
Block a user