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
|
|
@ -384,12 +384,14 @@ export class HeaderDrawerRenderer {
|
|||
|
||||
/**
|
||||
* Get visible column keys from DOM (preserves order for multi-resource views)
|
||||
* Uses filterTemplate.buildKeyFromColumn() for consistent key format with events
|
||||
*/
|
||||
private getVisibleColumnKeysFromDOM(): string[] {
|
||||
if (!this.filterTemplate) return [];
|
||||
const columns = document.querySelectorAll('swp-day-column');
|
||||
const columnKeys: string[] = [];
|
||||
columns.forEach(col => {
|
||||
const columnKey = (col as HTMLElement).dataset.columnKey;
|
||||
const columnKey = this.filterTemplate!.buildKeyFromColumn(col as HTMLElement);
|
||||
if (columnKey) columnKeys.push(columnKey);
|
||||
});
|
||||
return columnKeys;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue