mirror of
https://github.com/dbgate/dbgate
synced 2024-11-07 20:26:23 +00:00
bugfixes - hint displays
This commit is contained in:
parent
caf5453975
commit
8da0c359ff
@ -150,6 +150,7 @@ export abstract class GridDisplay {
|
||||
select.columns.push({
|
||||
exprType: 'column',
|
||||
columnName: column.columnName,
|
||||
alias: column.uniqueName,
|
||||
source: { name: column, alias: parentAlias },
|
||||
});
|
||||
res = 'refAdded';
|
||||
@ -232,7 +233,7 @@ export abstract class GridDisplay {
|
||||
select.columns.push({
|
||||
exprType: 'column',
|
||||
columnName: hintColumn.columnName,
|
||||
alias: `hint_${column.columnName}`,
|
||||
alias: `hint_${column.uniqueName}`,
|
||||
source: { alias: childAlias },
|
||||
});
|
||||
res = 'refAdded';
|
||||
@ -252,7 +253,7 @@ export abstract class GridDisplay {
|
||||
?.map(col => ({
|
||||
...col,
|
||||
isChecked: this.isColumnChecked(col),
|
||||
hintColumnName: col.foreignKey ? `hint_${col.columnName}` : null,
|
||||
hintColumnName: col.foreignKey ? `hint_${col.uniqueName}` : null,
|
||||
}));
|
||||
}
|
||||
|
||||
|
@ -168,6 +168,7 @@ export default function DataGridCore(props) {
|
||||
React.useEffect(() => {
|
||||
if (!isLoadedAll && firstVisibleRowScrollIndex + visibleRowCountUpperBound >= loadedRows.length) {
|
||||
const sql = display.getPageQuery(0, 1);
|
||||
// try to get SQL, if success, load page. If not, callbacks to load missing metadata are dispatched
|
||||
if (sql) loadNextData();
|
||||
}
|
||||
if (display.cache.refreshTime > loadedTime) {
|
||||
@ -300,7 +301,7 @@ export default function DataGridCore(props) {
|
||||
<TableHeaderRow ref={headerRowRef}>
|
||||
{realColumns.map(col => (
|
||||
<TableHeaderCell
|
||||
key={col.columnName}
|
||||
key={col.uniqueName}
|
||||
style={{ width: col.widthPx, minWidth: col.widthPx, maxWidth: col.widthPx }}
|
||||
>
|
||||
<ColumnLabel {...col} />
|
||||
@ -315,10 +316,10 @@ export default function DataGridCore(props) {
|
||||
<TableBodyRow key={firstVisibleRowScrollIndex + index}>
|
||||
{realColumns.map(col => (
|
||||
<TableBodyCell
|
||||
key={col.columnName}
|
||||
key={col.uniqueName}
|
||||
style={{ width: col.widthPx, minWidth: col.widthPx, maxWidth: col.widthPx }}
|
||||
>
|
||||
{row[col.columnName]}
|
||||
{row[col.uniqueName]}
|
||||
{col.hintColumnName && <HintSpan>{row[col.hintColumnName]}</HintSpan>}
|
||||
</TableBodyCell>
|
||||
))}
|
||||
|
Loading…
Reference in New Issue
Block a user