From 76ce6acb5ecf85e2905b11e7d9942d7a9c6b0bd9 Mon Sep 17 00:00:00 2001 From: Jan Prochazka Date: Sun, 10 May 2020 09:40:15 +0200 Subject: [PATCH] rename - refactor --- packages/web/src/datagrid/DataGridCore.js | 4 ++-- packages/web/src/datagrid/TableDataGrid.js | 4 ++-- packages/web/src/datagrid/types.ts | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/web/src/datagrid/DataGridCore.js b/packages/web/src/datagrid/DataGridCore.js index 5e63f61e..1d4594a8 100644 --- a/packages/web/src/datagrid/DataGridCore.js +++ b/packages/web/src/datagrid/DataGridCore.js @@ -429,8 +429,8 @@ export default function DataGridCore(props) { }, [jslid]); React.useEffect(() => { - if (props.onRefSourceRowsChanged && ((loadedRows && loadedRows.length > 0) || isLoadedAll)) { - props.onRefSourceRowsChanged(getSelectedRowData(), loadedTime); + if (props.onReferenceSourceChanged && ((loadedRows && loadedRows.length > 0) || isLoadedAll)) { + props.onReferenceSourceChanged(getSelectedRowData(), loadedTime); } }, [selectedCells, props.refReloadToken, loadedRows && loadedRows[0]]); diff --git a/packages/web/src/datagrid/TableDataGrid.js b/packages/web/src/datagrid/TableDataGrid.js index 2b5da2f3..60d6769c 100644 --- a/packages/web/src/datagrid/TableDataGrid.js +++ b/packages/web/src/datagrid/TableDataGrid.js @@ -71,7 +71,7 @@ export default function TableDataGrid({ } }, [conid, database, display]); - const handleRefSourcedRowsChanged = React.useCallback( + const handleReferenceSourceChanged = React.useCallback( (selectedRows, loadedTime) => { setMyLoadedTime(loadedTime); if (!reference) return; @@ -113,7 +113,7 @@ export default function TableDataGrid({ toolbarPortalRef={toolbarPortalRef} showReferences onReferenceClick={setReference} - onRefSourceRowsChanged={reference ? handleRefSourcedRowsChanged : null} + onReferenceSourceChanged={reference ? handleReferenceSourceChanged : null} refReloadToken={refReloadToken.toString()} masterLoadedTime={masterLoadedTime} /> diff --git a/packages/web/src/datagrid/types.ts b/packages/web/src/datagrid/types.ts index de2d2b34..55fce0d0 100644 --- a/packages/web/src/datagrid/types.ts +++ b/packages/web/src/datagrid/types.ts @@ -11,7 +11,7 @@ export interface DataGridProps { jslid?: string; showReferences?: boolean; onReferenceClick?: (def: GridReferenceDefinition) => void; - onRefSourceRowsChanged?: Function; + onReferenceSourceChanged?: Function; refReloadToken?: string; masterLoadedTime?: number }