feat(tree-view): add expandedIds #750 (#751)

This commit is contained in:
Eric Liu 2021-07-15 07:49:25 -07:00 committed by GitHub
commit d01995e11e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 46 additions and 2 deletions

View file

@ -5,6 +5,7 @@
let activeId: TreeNodeId = "";
let selectedIds = [];
let expandedIds = [1];
let children = [
{ id: 0, text: "AI / Machine learning", icon: Analytics16 },
{
@ -53,6 +54,7 @@
children="{children}"
bind:activeId
bind:selectedIds
bind:expandedIds
on:select="{({ detail }) => console.log('select', detail)}"
on:toggle="{({ detail }) => console.log('toggle', detail)}"
on:focus="{({ detail }) => console.log('focus', detail)}"