This commit is contained in:
SPRINX0\prochazka
2025-06-11 11:09:07 +02:00
parent 2ef7c63047
commit 34bdb72ffd
4 changed files with 12 additions and 5 deletions

View File

@@ -71,7 +71,8 @@ export abstract class GridDisplay {
protected setCache: ChangeCacheFunc, protected setCache: ChangeCacheFunc,
public driver?: EngineDriver, public driver?: EngineDriver,
public dbinfo: DatabaseInfo = null, public dbinfo: DatabaseInfo = null,
public serverVersion = null public serverVersion = null,
public currentSettings = null
) { ) {
this.dialect = (driver?.dialectByVersion && driver?.dialectByVersion(serverVersion)) || driver?.dialect; this.dialect = (driver?.dialectByVersion && driver?.dialectByVersion(serverVersion)) || driver?.dialect;
} }
@@ -206,7 +207,7 @@ export abstract class GridDisplay {
get hiddenColumnIndexes() { get hiddenColumnIndexes() {
// console.log('GridDisplay.hiddenColumn', this.config.hiddenColumns); // console.log('GridDisplay.hiddenColumn', this.config.hiddenColumns);
const res = (this.config.hiddenColumns || []).map(x => _.findIndex(this.allColumns, y => y.uniqueName == x)); const res = (this.config.hiddenColumns || []).map(x => _.findIndex(this.allColumns, y => y.uniqueName == x));
if (this.config.searchInColumns) { if (this.config.searchInColumns && !this.currentSettings?.['dataGrid.showAllColumnsWhenSearch']) {
for (let i = 0; i < this.allColumns.length; i++) { for (let i = 0; i < this.allColumns.length; i++) {
if (!filterName(this.config.searchInColumns, this.allColumns[i].columnName)) { if (!filterName(this.config.searchInColumns, this.allColumns[i].columnName)) {
res.push(i); res.push(i);

View File

@@ -38,9 +38,10 @@ export class TableGridDisplay extends GridDisplay {
serverVersion, serverVersion,
public getDictionaryDescription: DictionaryDescriptionFunc = null, public getDictionaryDescription: DictionaryDescriptionFunc = null,
isReadOnly = false, isReadOnly = false,
public isRawMode = false public isRawMode = false,
public currentSettings = null
) { ) {
super(config, setConfig, cache, setCache, driver, dbinfo, serverVersion); super(config, setConfig, cache, setCache, driver, dbinfo, serverVersion, currentSettings);
this.table = this.findTable(tableName); this.table = this.findTable(tableName);
if (!this.table) { if (!this.table) {

View File

@@ -20,6 +20,7 @@
useDatabaseInfo, useDatabaseInfo,
useDatabaseServerVersion, useDatabaseServerVersion,
useServerVersion, useServerVersion,
useSettings,
useUsedApps, useUsedApps,
} from '../utility/metadataLoaders'; } from '../utility/metadataLoaders';
@@ -55,6 +56,7 @@
$: apps = useUsedApps(); $: apps = useUsedApps();
$: extendedDbInfo = extendDatabaseInfoFromApps($dbinfo, $apps); $: extendedDbInfo = extendDatabaseInfoFromApps($dbinfo, $apps);
$: connections = useConnectionList(); $: connections = useConnectionList();
const settingsValue = useSettings();
// $: console.log('serverVersion', $serverVersion); // $: console.log('serverVersion', $serverVersion);
@@ -76,7 +78,8 @@
$serverVersion, $serverVersion,
table => getDictionaryDescription(table, conid, database, $apps, $connections), table => getDictionaryDescription(table, conid, database, $apps, $connections),
forceReadOnly || $connection?.isReadOnly, forceReadOnly || $connection?.isReadOnly,
isRawMode isRawMode,
$settingsValue
) )
: null; : null;

View File

@@ -192,6 +192,8 @@ ORDER BY
]} ]}
/> />
<FormCheckboxField name="dataGrid.showAllColumnsWhenSearch" label="Show all columns when searching" defaultValue={false} />
<div class="heading">SQL editor</div> <div class="heading">SQL editor</div>
<div class="flex"> <div class="flex">