Skip to content

Commit

Permalink
$mol_form_draft async select list example
Browse files Browse the repository at this point in the history
  • Loading branch information
zerkalica committed Sep 30, 2023
1 parent 64931fd commit 3948bb6
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
3 changes: 2 additions & 1 deletion form/draft/demo/demo.view.tree
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ $mol_form_draft_demo $mol_example
name \Friends
Content <= Friends $mol_select_list
pick_enabled true
showed => friends_showed
filter_pattern => friends_filter_pattern
option_title* <= friends_option_title* \
dictionary <= friends_suggestions *
jocker \Jocker
harley \Harley Quinn
Expand Down
7 changes: 6 additions & 1 deletion form/draft/demo/demo.view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,15 @@ namespace $.$$ {

@ $mol_mem
override friends_suggestions() {
if (! this.friends_showed()) return {}
this.$.$mol_wait_timeout(500)
this.friends_filter_pattern()
return super.friends_suggestions()
}

override friends_option_title(id: string) {
if (! id) return ''
return this.friends_suggestions()[id]
}

}
}
2 changes: 1 addition & 1 deletion list/list.view.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
align-items: stretch;
align-content: stretch; */
transition: none;
min-height: 2rem;
min-height: 1.5rem;
}

[mol_list_gap_before] ,
Expand Down
1 change: 0 additions & 1 deletion select/list/list.view.tree
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ $mol_select_list $mol_view
enabled <= drop_enabled <= enabled true
sub /$mol_view
<= Pick $mol_select
showed? <=> showed? false
event_select*? <=> event_select*? null
align_hor <= align_hor \right
options <= options_pickable <= options /string
Expand Down

0 comments on commit 3948bb6

Please sign in to comment.