I have a question related to custom headerRenderers for the
AdvancedDataGrid (and DataGrid?). I made a custom headerRenderer
that contains a TextInput control. If the user changes the text in
that TextInput control an event is dispatched; the grid listens to
this event, sets a filter that uses the user's input when it
receives the event, and finally refreshes its data provider.
Problem: as soon as I call dataProvider.refresh() the
TextInput control loses focus. Why does it lose focus and how can I
You can indeed set focus to the text input again, but:
- When are you going to do this? If I do it right after I
refresh the dataprovider, the text field will still lose focus if
refreshing takes even a tiny bit of time (ie always). So, in that
case I would like to receive an event once refreshing is done, and
THEN set focus to the field.
- My event is dispatched when I receive a "change" event of
the text input field. Every time the user enters a character I
would need to set focus back to the text field. I tried this, but I
don't think this is a nice solution: the text field will sort of
"flash" because it constantly loses and gets focus...
In fact, I don't want my text field to lose focus at all...