mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-19 15:25:59 +00:00
form view
This commit is contained in:
@@ -32,7 +32,7 @@ async function loadRow(props, sql) {
|
||||
}
|
||||
|
||||
export default function SqlFormView(props) {
|
||||
const { formDisplay, changeSetState, dispatchChangeSet, conid, database } = props;
|
||||
const { formDisplay, changeSetState, dispatchChangeSet, conid, database, onReferenceSourceChanged } = props;
|
||||
const [rowData, setRowData] = React.useState(null);
|
||||
const [reloadToken, setReloadToken] = React.useState(0);
|
||||
const [rowCountInfo, setRowCountInfo] = React.useState(null);
|
||||
@@ -70,6 +70,10 @@ export default function SqlFormView(props) {
|
||||
}
|
||||
};
|
||||
|
||||
React.useEffect(() => {
|
||||
if (onReferenceSourceChanged && rowData) onReferenceSourceChanged([rowData]);
|
||||
}, [rowData]);
|
||||
|
||||
React.useEffect(() => {
|
||||
if (formDisplay) handleLoadCurrentRow();
|
||||
setRowCountInfo(null);
|
||||
|
||||
Reference in New Issue
Block a user