After selecting option from dropdown. Value is not clearing on backspace.
https://codesandbox.io/s/nnvrz6px6l.
Any help is greatly appreciable
Just ran into the same issue it appears you now need to add the isClearable={true} prop to the Select. After adding this prop you can now clear the selected item with the backspace and a small x also appears to allow clearing the selected item.
Related
Ive tried every possibility to enable keyboard navigation between three input fields but nothing happens. Ive tried automatic, vertical and explicit. Ive checked the "Vizualise" option and see that the three input fields are connected. Ive set the first field to First Selected in the EventSystem. Help me Obi Wan!
I am trying to display a word suggestion list when ctl+space entered as in eclipse.
For that I need to know the location where user has entered ctrl+space so that i can display the suggestion list exact below to the word user just entered.
I see ways to get the mouse cursor position , But isnt there a way to get the keyboard button pressed position ,
I am writing inside textArea, I tried getCursor, but it gives me the no of word on which user entered ctrl+space. Not the location as per the Window.
Any idea
thanks
There is no reliable, accurate and cross-browser way to do it with TextArea.
You can experiment with a RichTextArea (you don't have to provide a toolbar for rich text features) and its getFormatter().insertHTML() method. It will insert a new HTML element at a cursor position. You can insert a list of suggested words, that you can style to look anyway you like, or you can insert an empty div and try to show a panel relative to it.
Or you can use a different UI approach. Create a panel with a fixed position relative to your TextArea and show your suggested words there - similar to the way good smartphone keyboards show suggested words just above the keyboard itself. Once your users realize that suggested words always show up in the same place, they may even like this design better.
I have a Gtk Entry that uses a Entry Completion object. I have set it up to an extent. If I enter the minimum key length number of characters the completion popup shows me available choices. So far so good.
Now what I want is that the text field should show the completion popup even it is empty, as soon as it has focus. Even if set the completion object's minimum key length to 0, the completion popup will not immediately appear as soon as the text field has focus. It will, however, appear if I enter something then delete it, leaving the text field empty.
My real goal is to select an item from a predefined list of choices, quickly, using the keyboard. What I did was to use a Gtk Entry attached to an Entry Completion Object which uses a List Store. Any alternatives are most welcome...
I am using gtkmm/Glade for doing my work. Please tell me if I need to add anything.
Thanks
If you just want to select from a list of predefined choices you'd probably be better using a combo box instead of a entry.
I was implementing a custom CellTable that has a infinite scroll feature using the CellList showcase example ( http://gwt.google.com/samples/Showcase/Showcase.html#!CwCellList ). However, I found a feature in CellList/Table that is undesirable in this case: changing visible range after clicking an item would cause the List/Table to be automatically scrolled to the selected item.
you can try the showcase example in above to see the exact same behavior. When no item is selected, the infinite scroll works just fine, but when you click an item and then scroll it, it will always jump back to the selected item when the range is changed.
I also found that it only happens when the focus is still on the item, that is, if you select an item and then click somewhere else to lose the focus, it wouldn't happen.
I've been digging around the GWT code and trying to find out how to disable this feature with no success. Did anyone handled this situation before?
As a simple workaround, you can call focus() on some element, to remove the focus from the item (without removing the selection).
In the showcase example, in ShowMorePagerPanel, add e.g.
scrollable.getElement().focus();
at the beginning of the onScroll(ScrollEvent event) method.
I ran into the same problem and couldn't get Chris's answer to solve it, but the following solution worked for me:
in your onScroll(ScrollEvent event) method, add a line similar to the following, assuming yourTable is an instance of something extending AbstractHasData
yourTable.setFocus(false);
I have a combobox on a form. Clicking on a particular label should hide this combobox. The problem is that if the combobox has focus, clicking on the button which hides this combobox gives error.How can I resolve this runtime error?
Move the focus. If necessary, create a very small control to receive the focus.
Me.SomeControlThatIsNotTheCombobox.SetFocus
Re Comments
Note that this label is not associated with a control.
Private Sub Label1_Click()
Me.Text1.SetFocus
Me.Label1.Visible = False
End Sub
I know this is an old post, but I recently just ran into a similar issue (and this post was in the first 4 or 5 results). If the control you're trying to disable is the first on the subform, try setting its Tab Index to 1, not 0. As soon as the subform gets the focus, the first control on it does, too. I was trying to set this during a Form_Open event, and this solved it.
Rather than setting focus to any particular control, which may cause maintenance issues in the future if the controls on the form change, if you simulate a key press of Tab then focus will move to the next object in the tab order.
SendKeys "{TAB}"
DoEvents
Me.Command4.Visible = False
Note the doevents is necessary to allow the processing of the Tab.