picyka Posted September 21, 2020 Share Posted September 21, 2020 C:\Program Files (x86)\FMSoft\Framework\uniGUI\Demos\Touch\DBLookupComboBox - Custom Remote Query (CDS) Running the example above by cell phone, I notice that I need to double-click in the field to be able to search, is there any configuration for not needing to click more than once? Note: Clicking only once the keyboard does not show to type. Build 1531. Link to comment Share on other sites More sharing options...
Sherzod Posted September 22, 2020 Share Posted September 22, 2020 3 hours ago, picyka said: Running the example above by cell phone, I notice that I need to double-click in the field to be able to search, is there any configuration for not needing to click more than once? Note: Clicking only once the keyboard does not show to type. Hello, Can you try this approach? function afterCreate(sender) { sender.inputElement.on('tap', function(){sender.focus()}); } 1 Link to comment Share on other sites More sharing options...
picyka Posted September 22, 2020 Author Share Posted September 22, 2020 Perfect! 1 Link to comment Share on other sites More sharing options...
PS1 Posted January 22 Share Posted January 22 how can i add to this ,,tap function", checking if there is any text written in the combobox ? asking becouse without it the dropdownlist is hiding after 0.1 sec Link to comment Share on other sites More sharing options...
Sherzod Posted January 22 Share Posted January 22 10 minutes ago, PS1 said: how can i add to this ,,tap function", checking if there is any text written in the combobox ? asking becouse without it the dropdownlist is hiding after 0.1 sec Hello, Can you please clarify? Link to comment Share on other sites More sharing options...
PS1 Posted January 22 Share Posted January 22 I need to check if there is any text in the textEdit part of unimDBLookupComboBox Need something like this: function afterCreate(sender) { sender.inputElement.on('tap', function(){ if (sender.e.getText() == "") sender.focus(); }); } It is needed becouse if user will select item from list, he cant again drop/show the list of items. It disappears after 0.1 sec. User need to change text in order to show the item list. It works probably like that becouse in previous solution we setting focus when dblookupcombobox is taped. Link to comment Share on other sites More sharing options...
Sherzod Posted January 22 Share Posted January 22 2 minutes ago, PS1 said: if (sender.e.getText() == "")... Try this instead: if (sender.getValue() == "") { } 1 Link to comment Share on other sites More sharing options...
PS1 Posted January 22 Share Posted January 22 Nice, Thank you ! 1 Link to comment Share on other sites More sharing options...
PS1 Posted January 25 Share Posted January 25 One more question. How to add checking (in above afterCreate js function) if there are items in the ComboBox? Need it becouse if user will query the records, chose item and later clear text (by clear button), after he tap again on the combobox it will show the items for 0.1 sec becouse the list is loaded already. Link to comment Share on other sites More sharing options...
Sherzod Posted January 25 Share Posted January 25 1 hour ago, PS1 said: One more question. How to add checking (in above afterCreate js function) if there are items in the ComboBox? Need it becouse if user will query the records, chose item and later clear text (by clear button), after he tap again on the combobox it will show the items for 0.1 sec becouse the list is loaded already. What you're asking still concerns to the mobile component ?! Link to comment Share on other sites More sharing options...
PS1 Posted January 25 Share Posted January 25 Yes Link to comment Share on other sites More sharing options...
PS1 Posted January 25 Share Posted January 25 ok i think i found better solution: function afterCreate(sender) { sender.inputElement.on('tap', function(){ if (((sender.store.activeRanges == null) || (sender.store.activeRanges[0].records.length == 0))) sender.focus(); }); } It enables keyboard(on first tap) only if there are no loaded records in unimDBLookupComboBox. It works but i dont rly know if this is a good approach ? Link to comment Share on other sites More sharing options...
Sherzod Posted January 25 Share Posted January 25 1 hour ago, PS1 said: One more question. How to add checking (in above afterCreate js function) if there are items in the ComboBox? You can use this code inside a function if (sender.getStore().count() > 0) { } 1 Link to comment Share on other sites More sharing options...
PS1 Posted January 25 Share Posted January 25 Nice, this code looks better. Thank you ! 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now