Improve subtable handling in data prep
This commit is contained in:
parent
91863d85a8
commit
9eafba6165
1 changed files with 5 additions and 3 deletions
|
|
@ -90,9 +90,11 @@ export class StatsViewer extends HandlebarsApplicationMixin(ApplicationV2) {
|
||||||
ctx.tables = tableList;
|
ctx.tables = tableList;
|
||||||
|
|
||||||
const subtableList = subtables[this._selectedTable];
|
const subtableList = subtables[this._selectedTable];
|
||||||
if (subtableList && !subtableList.includes(this._selectedSubtable)) {
|
if (!subtableList) {
|
||||||
this._selectedSubtable = subtableList[0];
|
this._selectedSubtable = undefined;
|
||||||
}
|
} else if (!subtableList.includes(this._selectedSubtable)) {
|
||||||
|
this._selectedSubtable = subtableList?.[0];
|
||||||
|
};
|
||||||
ctx.subtable = this._selectedSubtable;
|
ctx.subtable = this._selectedSubtable;
|
||||||
ctx.subtables = subtableList;
|
ctx.subtables = subtableList;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue