vogievetsky opened a new pull request, #14632:
URL: https://github.com/apache/druid/pull/14632

   Fixes a UX bug with typing filters where the filter inputs get a bit too 
many updates causing the cursor to jump to the end (or sometimes missing 
letters if you type fast enough.
   
   <img width="1191" alt="image" 
src="https://github.com/apache/druid/assets/177816/566ed08c-ee1f-481c-b6fb-9c2b391fd614";>
   
   The simplest way to see a manifestation of the bug is try to type in the 
middle of the text, the bug will put the cursor at the end.
   
   ### The detailed issue (for those who care)
   
   Say `"ka"` is already typed and the user adds an `f`. The on change will be 
called with `"kaf"` but the table will re-render also rendering the input once 
with the old value of `"ka"` reseting the cursor at the end before the URL is 
updated and parsed as `"kaf"`.
   
   ### The solution
   
   The source of truth for the input box will now be the local state 
`focusedText` for the entire time the input is in focus. This means that no 
update thrashing will bubble up to the user while they are focused on the 
input. When focus is lost (onBlur) the text in the input will 'revert' to the 
state from the URL which should be the same as what was entered.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to