Skip to content

Commit

Permalink
fix(ic-tree-item): added styling and function changes
Browse files Browse the repository at this point in the history
added styling to correct icon changing position and size and added functionality to handle
truncating tree items before first render
  • Loading branch information
cd3859 committed Feb 11, 2025
1 parent 54a23d3 commit 4600038
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
}

.icon-container {
width: var(--ic-space-lg);
min-width: var(--ic-space-lg);
height: var(--ic-space-lg);
margin: 0 var(--ic-space-xs) 0 0;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,10 @@ export class TreeItem {
this.hostMutationObserver?.disconnect();
}

componentWillRender(): void {
this.truncateTreeItem && this.truncateTreeItemLabel(this.el);
}

componentWillLoad(): void {
removeDisabledFalse(this.disabled, this.el);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
}

.icon-container {
width: var(--ic-space-lg);
min-width: var(--ic-space-lg);
height: var(--ic-space-lg);
margin: 0 var(--ic-space-xs) 0 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,18 @@ export class TreeView {
this.hostMutationObserver?.disconnect();
}

async componentWillRender(): Promise<void> {
await this.setTreeItems();
this.watchTruncateTreeItemsHandler();
this.truncateHeading && this.truncateTreeViewHeading();
}

componentDidLoad(): void {
this.setTreeItems();

this.watchSizeHandler();
this.watchFocusInsetHandler();
this.watchThemeHandler();
this.watchTruncateTreeItemsHandler();

this.truncateHeading && this.truncateTreeViewHeading();

this.addSlotChangeListener();

Expand Down

0 comments on commit 4600038

Please sign in to comment.