-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New tree component #1693
base: main
Are you sure you want to change the base?
New tree component #1693
Conversation
} | ||
|
||
override update(): void { | ||
// empty |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to leave it that way? :)
*/ | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
export class FlatTreeDataSource<T = any> extends TreeDataSource<T> { | ||
#mapping: FlatTreeDataSourceMapping<T>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please add spacing between variables and maybe add descriptions as well? :)
*/ | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
export class NestedTreeDataSource<T = any> extends TreeDataSource<T> { | ||
#mapping: NestedTreeDataSourceMapping<T>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please add spacing between variables and maybe add descriptions as well?
*/ | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
export abstract class TreeDataSource<T = any> extends DataSource<T, TreeDataSourceNode<T>> { | ||
#loadChildren?: TreeDataSourceOptions<T>['loadChildren']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please add spacing between variables and maybe add descriptions as well?
@property({ attribute: false }) scopedElements?: Record<string, typeof HTMLElement>; | ||
|
||
/** @internal Emits when the user selects a tree node. */ | ||
@event({ name: 'sl-select' }) selectEvent!: EventEmitter<SlSelectEvent<TreeDataSourceNode<T>>>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm just thinking, maybe we should rename SlSelectEvent from sl-select
to sth else? Since sl-select
is also used for select component?
if (this.dataSource?.selects === 'multiple') { | ||
this.setAttribute('aria-multiselectable', 'true'); | ||
} else { | ||
this.removeAttribute('aria-multiselectable'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it should be this.setAttribute('aria-multiselectable', 'false');
? So aria-multiselectable="false"
by default?
No description provided.