rename - refactor

This commit is contained in:
Jan Prochazka 2020-05-10 09:40:15 +02:00
parent 9b39677b93
commit 76ce6acb5e
3 changed files with 5 additions and 5 deletions

View File

@ -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]]);

View File

@ -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}
/>

View File

@ -11,7 +11,7 @@ export interface DataGridProps {
jslid?: string;
showReferences?: boolean;
onReferenceClick?: (def: GridReferenceDefinition) => void;
onRefSourceRowsChanged?: Function;
onReferenceSourceChanged?: Function;
refReloadToken?: string;
masterLoadedTime?: number
}