mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-30 16:13:58 +00:00
SYNC: fixed all search column settings for alternative grids #1118
This commit is contained in:
committed by
Diflow
parent
e85f43beb1
commit
28439c010f
@@ -101,9 +101,10 @@ export class CollectionGridDisplay extends GridDisplay {
|
|||||||
setCache: ChangeCacheFunc,
|
setCache: ChangeCacheFunc,
|
||||||
loadedRows,
|
loadedRows,
|
||||||
changeSet,
|
changeSet,
|
||||||
readOnly = false
|
readOnly = false,
|
||||||
|
currentSettings = null
|
||||||
) {
|
) {
|
||||||
super(config, setConfig, cache, setCache, driver);
|
super(config, setConfig, cache, setCache, driver, undefined, undefined, currentSettings);
|
||||||
const changedDocs = _.compact(changeSet.updates.map(chs => chs.document));
|
const changedDocs = _.compact(changeSet.updates.map(chs => chs.document));
|
||||||
const insertedDocs = _.compact(changeSet.inserts.map(chs => chs.fields));
|
const insertedDocs = _.compact(changeSet.inserts.map(chs => chs.fields));
|
||||||
this.columns = analyseCollectionDisplayColumns([...(loadedRows || []), ...changedDocs, ...insertedDocs], this);
|
this.columns = analyseCollectionDisplayColumns([...(loadedRows || []), ...changedDocs, ...insertedDocs], this);
|
||||||
|
|||||||
@@ -17,9 +17,10 @@ export class JslGridDisplay extends GridDisplay {
|
|||||||
isDynamicStructure: boolean,
|
isDynamicStructure: boolean,
|
||||||
supportsReload: boolean,
|
supportsReload: boolean,
|
||||||
editable: boolean = false,
|
editable: boolean = false,
|
||||||
driver: EngineDriver = null
|
driver: EngineDriver = null,
|
||||||
|
currentSettings = null
|
||||||
) {
|
) {
|
||||||
super(config, setConfig, cache, setCache, driver);
|
super(config, setConfig, cache, setCache, driver, undefined, undefined, currentSettings);
|
||||||
|
|
||||||
this.filterable = true;
|
this.filterable = true;
|
||||||
this.sortable = true;
|
this.sortable = true;
|
||||||
|
|||||||
@@ -12,9 +12,10 @@ export class ViewGridDisplay extends GridDisplay {
|
|||||||
cache: GridCache,
|
cache: GridCache,
|
||||||
setCache: ChangeCacheFunc,
|
setCache: ChangeCacheFunc,
|
||||||
dbinfo: DatabaseInfo,
|
dbinfo: DatabaseInfo,
|
||||||
serverVersion
|
serverVersion,
|
||||||
|
currentSettings
|
||||||
) {
|
) {
|
||||||
super(config, setConfig, cache, setCache, driver, dbinfo, serverVersion);
|
super(config, setConfig, cache, setCache, driver, dbinfo, serverVersion, currentSettings);
|
||||||
this.columns = this.getDisplayColumns(view);
|
this.columns = this.getDisplayColumns(view);
|
||||||
this.formColumns = this.columns;
|
this.formColumns = this.columns;
|
||||||
this.filterable = true;
|
this.filterable = true;
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
|
|
||||||
import DataGrid from './DataGrid.svelte';
|
import DataGrid from './DataGrid.svelte';
|
||||||
import JslDataGridCore from './JslDataGridCore.svelte';
|
import JslDataGridCore from './JslDataGridCore.svelte';
|
||||||
|
import { useSettings } from '../utility/metadataLoaders';
|
||||||
|
|
||||||
export let jslid;
|
export let jslid;
|
||||||
export let supportsReload = false;
|
export let supportsReload = false;
|
||||||
@@ -30,6 +31,7 @@
|
|||||||
// $: columns = ($info && $info.columns) || [];
|
// $: columns = ($info && $info.columns) || [];
|
||||||
const config = writable(createGridConfig());
|
const config = writable(createGridConfig());
|
||||||
const cache = writable(createGridCache());
|
const cache = writable(createGridCache());
|
||||||
|
const settingsValue = useSettings();
|
||||||
|
|
||||||
function handleInitializeFile() {
|
function handleInitializeFile() {
|
||||||
infoCounter += 1;
|
infoCounter += 1;
|
||||||
@@ -71,7 +73,8 @@
|
|||||||
infoUsed?.__isDynamicStructure,
|
infoUsed?.__isDynamicStructure,
|
||||||
supportsReload,
|
supportsReload,
|
||||||
!!changeSetState,
|
!!changeSetState,
|
||||||
driver
|
driver,
|
||||||
|
$settingsValue
|
||||||
);
|
);
|
||||||
|
|
||||||
function handleSetLoadedRows(rows) {
|
function handleSetLoadedRows(rows) {
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
import createUndoReducer from '../utility/createUndoReducer';
|
import createUndoReducer from '../utility/createUndoReducer';
|
||||||
import invalidateCommands from '../commands/invalidateCommands';
|
import invalidateCommands from '../commands/invalidateCommands';
|
||||||
import CollectionDataGridCore from '../datagrid/CollectionDataGridCore.svelte';
|
import CollectionDataGridCore from '../datagrid/CollectionDataGridCore.svelte';
|
||||||
import { useCollectionInfo, useConnectionInfo } from '../utility/metadataLoaders';
|
import { useCollectionInfo, useConnectionInfo, useSettings } from '../utility/metadataLoaders';
|
||||||
import { extensions } from '../stores';
|
import { extensions } from '../stores';
|
||||||
import CollectionJsonView from '../formview/CollectionJsonView.svelte';
|
import CollectionJsonView from '../formview/CollectionJsonView.svelte';
|
||||||
import createActivator, { getActiveComponent } from '../utility/createActivator';
|
import createActivator, { getActiveComponent } from '../utility/createActivator';
|
||||||
@@ -69,6 +69,7 @@
|
|||||||
|
|
||||||
const config = useGridConfig(tabid);
|
const config = useGridConfig(tabid);
|
||||||
const cache = writable(createGridCache());
|
const cache = writable(createGridCache());
|
||||||
|
const settingsValue = useSettings();
|
||||||
|
|
||||||
const { editorState, editorValue, setEditorData } = useEditorData({
|
const { editorState, editorValue, setEditorData } = useEditorData({
|
||||||
tabid,
|
tabid,
|
||||||
@@ -112,7 +113,8 @@
|
|||||||
cache.update,
|
cache.update,
|
||||||
loadedRows,
|
loadedRows,
|
||||||
$changeSetStore?.value,
|
$changeSetStore?.value,
|
||||||
$connection?.isReadOnly
|
$connection?.isReadOnly,
|
||||||
|
$settingsValue
|
||||||
)
|
)
|
||||||
: null;
|
: null;
|
||||||
// $: console.log('LOADED ROWS MONGO', loadedRows);
|
// $: console.log('LOADED ROWS MONGO', loadedRows);
|
||||||
|
|||||||
@@ -22,6 +22,7 @@
|
|||||||
useConnectionInfo,
|
useConnectionInfo,
|
||||||
useDatabaseInfo,
|
useDatabaseInfo,
|
||||||
useDatabaseServerVersion,
|
useDatabaseServerVersion,
|
||||||
|
useSettings,
|
||||||
useViewInfo,
|
useViewInfo,
|
||||||
} from '../utility/metadataLoaders';
|
} from '../utility/metadataLoaders';
|
||||||
import { getLocalStorage, setLocalStorage } from '../utility/storageCache';
|
import { getLocalStorage, setLocalStorage } from '../utility/storageCache';
|
||||||
@@ -44,6 +45,7 @@
|
|||||||
|
|
||||||
const config = useGridConfig(tabid);
|
const config = useGridConfig(tabid);
|
||||||
const cache = writable(createGridCache());
|
const cache = writable(createGridCache());
|
||||||
|
const settingsValue = useSettings();
|
||||||
|
|
||||||
$: display =
|
$: display =
|
||||||
$viewInfo && $connection && $serverVersion
|
$viewInfo && $connection && $serverVersion
|
||||||
@@ -56,7 +58,8 @@
|
|||||||
$cache,
|
$cache,
|
||||||
cache.update,
|
cache.update,
|
||||||
$dbinfo,
|
$dbinfo,
|
||||||
$serverVersion
|
$serverVersion,
|
||||||
|
$settingsValue
|
||||||
)
|
)
|
||||||
: null;
|
: null;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user