[Listbox] Wait for mousemove before allowing mouseup to trigger an option select
See original GitHub issue❓Question
Is there specific reason for Listbox
component to select am item on museUp
?
I’m trying to implement a design where selected ListboxOption
is displayed on top of the ListboxButton
, similar how https://material-ui.com/components/selects/ does it.
Or like chrome does it with native select tag.
I’m passing a custom position
prop to ListboxPopover
component that calculates the position - and that seems to work, but when clicking on the ListboxButton
happens it immediately closes and does not stay open. Was looking at the Listbox
code and it seemed like item selection get’s triggered on mouseUp
…
Is there a way to do what I’m trying to do? Or is this not possible…?
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Prevent WPF ListBox from selecting item under mouse when ...
If a WPF ListBox gets a MouseMove event while the mouse button is held down, it will change the listbox's selection. That is,...
Read more >ListBox.MouseMove event (Access) - Microsoft Learn
To cause a MouseMove event for a form to occur, move the mouse pointer over a blank area, record selector, or scroll bar...
Read more >ListBox Class Reference - JUCE
Sets the rows that should be selected, based on an explicit set of ranges. More... bool, isRowSelected (int rowNumber) const. Checks whether a...
Read more >Mouse Events and Cursors - Springer Link
MouseMove. Raised when the mouse cursor moves over a control. MouseUp. Raised when the mouse button is released. By default, this event always...
Read more >Implementing a smoothly animated ListBox - CodeProject
MultiSelectEnabled : when true , the selection model allows several ... This means that if a mouse move event occurs before the previous...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Addressed in 0.10.1
@chancestrickland just tried out the master branch and code from
listbox/examples/position-over-active.example.tsx
- and it worked great out the box and managed to get the design to look like we wanted 😄 Thank you so much for all the changes!Could not agree more - as there was no way to get access to the selected option before your updates that was the easier way to prototype on.