mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-20 07:46:00 +00:00
perspective fixes
This commit is contained in:
@@ -37,6 +37,7 @@
|
||||
PerspectiveTableColumnNode,
|
||||
PerspectiveTableNode,
|
||||
processPerspectiveDefaultColunns,
|
||||
shouldProcessPerspectiveDefaultColunns,
|
||||
} from 'dbgate-datalib';
|
||||
|
||||
import _ from 'lodash';
|
||||
@@ -150,20 +151,23 @@
|
||||
: null;
|
||||
|
||||
$: {
|
||||
tick().then(() => {
|
||||
const newConfig = processPerspectiveDefaultColunns(config, $dbInfos, conid, database);
|
||||
if (newConfig) {
|
||||
if (
|
||||
newConfig.nodes.filter(x => x.defaultColumnsProcessed).length >
|
||||
config.nodes.filter(x => x.defaultColumnsProcessed).length
|
||||
) {
|
||||
console.log('CONFIG CHANGED');
|
||||
setConfig(() => newConfig);
|
||||
} else {
|
||||
console.warn('No new default columns', newConfig);
|
||||
}
|
||||
}
|
||||
});
|
||||
if (shouldProcessPerspectiveDefaultColunns(config, $dbInfos, conid, database)) {
|
||||
setConfig(cfg => processPerspectiveDefaultColunns(cfg, $dbInfos, conid, database));
|
||||
}
|
||||
// tick().then(() => {
|
||||
// const newConfig = processPerspectiveDefaultColunns(config, $dbInfos, conid, database);
|
||||
// if (newConfig) {
|
||||
// if (
|
||||
// newConfig.nodes.filter(x => x.defaultColumnsProcessed).length >
|
||||
// config.nodes.filter(x => x.defaultColumnsProcessed).length
|
||||
// ) {
|
||||
// console.log('CONFIG CHANGED');
|
||||
// setConfig(() => newConfig);
|
||||
// } else {
|
||||
// console.warn('No new default columns', newConfig);
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user