mirror of
https://github.com/dbgate/dbgate
synced 2024-11-07 20:26:23 +00:00
rename - refactor
This commit is contained in:
parent
9b39677b93
commit
76ce6acb5e
@ -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]]);
|
||||
|
||||
|
@ -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}
|
||||
/>
|
||||
|
@ -11,7 +11,7 @@ export interface DataGridProps {
|
||||
jslid?: string;
|
||||
showReferences?: boolean;
|
||||
onReferenceClick?: (def: GridReferenceDefinition) => void;
|
||||
onRefSourceRowsChanged?: Function;
|
||||
onReferenceSourceChanged?: Function;
|
||||
refReloadToken?: string;
|
||||
masterLoadedTime?: number
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user