Improves column key extraction in header drawer
Enhances column key retrieval to use consistent key format Adds null check for filter template to prevent potential errors Uses buildKeyFromColumn() for more robust key generation
This commit is contained in:
parent
9777f463b5
commit
58cedb9fad
2 changed files with 5 additions and 2 deletions
|
|
@ -12,7 +12,8 @@
|
||||||
"Bash(npm install:*)",
|
"Bash(npm install:*)",
|
||||||
"WebFetch(domain:raw.githubusercontent.com)",
|
"WebFetch(domain:raw.githubusercontent.com)",
|
||||||
"Bash(npm run css:analyze:*)",
|
"Bash(npm run css:analyze:*)",
|
||||||
"Bash(npm run test:run:*)"
|
"Bash(npm run test:run:*)",
|
||||||
|
"Bash(cd:*)"
|
||||||
],
|
],
|
||||||
"deny": [],
|
"deny": [],
|
||||||
"ask": []
|
"ask": []
|
||||||
|
|
|
||||||
|
|
@ -384,12 +384,14 @@ export class HeaderDrawerRenderer {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get visible column keys from DOM (preserves order for multi-resource views)
|
* Get visible column keys from DOM (preserves order for multi-resource views)
|
||||||
|
* Uses filterTemplate.buildKeyFromColumn() for consistent key format with events
|
||||||
*/
|
*/
|
||||||
private getVisibleColumnKeysFromDOM(): string[] {
|
private getVisibleColumnKeysFromDOM(): string[] {
|
||||||
|
if (!this.filterTemplate) return [];
|
||||||
const columns = document.querySelectorAll('swp-day-column');
|
const columns = document.querySelectorAll('swp-day-column');
|
||||||
const columnKeys: string[] = [];
|
const columnKeys: string[] = [];
|
||||||
columns.forEach(col => {
|
columns.forEach(col => {
|
||||||
const columnKey = (col as HTMLElement).dataset.columnKey;
|
const columnKey = this.filterTemplate!.buildKeyFromColumn(col as HTMLElement);
|
||||||
if (columnKey) columnKeys.push(columnKey);
|
if (columnKey) columnKeys.push(columnKey);
|
||||||
});
|
});
|
||||||
return columnKeys;
|
return columnKeys;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue