mirror of
https://github.com/dbgate/dbgate
synced 2024-11-07 20:26:23 +00:00
removed table blinking
This commit is contained in:
parent
7e52e17391
commit
c81b50bb90
@ -57,21 +57,27 @@ export default function TableDataGrid({
|
|||||||
setRefReloadToken((v) => v + 1);
|
setRefReloadToken((v) => v + 1);
|
||||||
}, [reference]);
|
}, [reference]);
|
||||||
|
|
||||||
const display = React.useMemo(
|
function createDisplay() {
|
||||||
() =>
|
return connection
|
||||||
connection
|
? new TableGridDisplay(
|
||||||
? new TableGridDisplay(
|
{ schemaName, pureName },
|
||||||
{ schemaName, pureName },
|
engines(connection),
|
||||||
engines(connection),
|
config || myConfig,
|
||||||
config || myConfig,
|
setConfig || setMyConfig,
|
||||||
setConfig || setMyConfig,
|
cache || myCache,
|
||||||
cache || myCache,
|
setCache || setMyCache,
|
||||||
setCache || setMyCache,
|
dbinfo
|
||||||
dbinfo
|
)
|
||||||
)
|
: null;
|
||||||
: null,
|
}
|
||||||
[connection, config || myConfig, cache || myCache, conid, database, schemaName, pureName, dbinfo]
|
|
||||||
);
|
const [display, setDisplay] = React.useState(createDisplay());
|
||||||
|
|
||||||
|
React.useEffect(() => {
|
||||||
|
const newDisplay = createDisplay();
|
||||||
|
if (display && display.isLoadedCorrectly && !newDisplay.isLoadedCorrectly) return;
|
||||||
|
setDisplay(newDisplay);
|
||||||
|
}, [connection, config || myConfig, cache || myCache, conid, database, schemaName, pureName, dbinfo]);
|
||||||
|
|
||||||
const handleDatabaseStructureChanged = React.useCallback(() => {
|
const handleDatabaseStructureChanged = React.useCallback(() => {
|
||||||
(setCache || setMyCache)(createGridCache());
|
(setCache || setMyCache)(createGridCache());
|
||||||
|
Loading…
Reference in New Issue
Block a user