Want to create a combobox in dojo where the dropdown menu and autocompletion kicks in only after the user inputs 4 characters

前端 未结 1 973
青春惊慌失措
青春惊慌失措 2021-01-22 04:26

I wanted to create a combobox in dojo where the drop down menu and autocompletion kicks in only after the user inputs 3 characters. The current default will start showing the dr

1条回答
  •  情书的邮戳
    2021-01-22 04:30

    I can point you in the right direction: navigate to the API page here: http://dojotoolkit.org/api/
    and look up dojox.validate.isText.There is a minlength flag that can be set that returns a boolean. Or, you could use regular expressions: `dojox.validate.regexpwhich can be found on the same page. Here's an example of using the minlength flag. It's not the most elegant solution(it would also be better if the comboBox had an autoComplete restraint to enable/disable), but it illustrates how attributes can be set for dojo widgets.

    
    
    
    
    
        

    0 讨论(0)
提交回复
热议问题