diff --git a/form/draft/demo/demo.view.tree b/form/draft/demo/demo.view.tree index 4208f7bf48e..eabc96b066a 100644 --- a/form/draft/demo/demo.view.tree +++ b/form/draft/demo/demo.view.tree @@ -70,6 +70,8 @@ $mol_form_draft_demo $mol_example <= Friends_field $mol_form_field name \Friends Content <= Friends $mol_select_list + pick_enabled true + showed => friends_showed dictionary <= friends_suggestions * jocker \Jocker harley \Harley Quinn diff --git a/form/draft/demo/demo.view.ts b/form/draft/demo/demo.view.ts index 230eede1c54..2943b374c0b 100644 --- a/form/draft/demo/demo.view.ts +++ b/form/draft/demo/demo.view.ts @@ -44,6 +44,12 @@ namespace $.$$ { super.publish() this.result( this.message_done() ) } + + override friends_suggestions() { + if (! this.friends_showed()) return {} + this.$.$mol_wait_timeout(1000) + return super.friends_suggestions() + } } } diff --git a/select/list/list.view.tree b/select/list/list.view.tree index e9cf2339dea..74e747c4764 100644 --- a/select/list/list.view.tree +++ b/select/list/list.view.tree @@ -7,9 +7,10 @@ $mol_select_list $mol_view click?event <=> remove*?event null hint <= badge_hint @ \Drop enabled <= drop_enabled <= enabled true - filter_auto_clean 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 value? <=> pick? \ diff --git a/select/list/list.view.ts b/select/list/list.view.ts index 919afea4b9e..40222b4764d 100644 --- a/select/list/list.view.ts +++ b/select/list/list.view.ts @@ -16,16 +16,14 @@ namespace $.$$ { if( !key ) return '' this.value([ ... this.value() , key ]) - new $mol_after_frame(()=> { - if( !this.pick_enabled() ) return - if (this.filter_auto_clean()) this.Pick().filter_pattern( '' ) - this.Pick().Trigger().focused( true ) - this.Pick().open() - }) - return '' } + override event_select( id : string , event? : MouseEvent ) { + event?.preventDefault() + this.pick( id ) + } + @ $mol_mem override options() { return Object.keys( this.dictionary() ) as readonly string[]