You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I select an object using the <Select> component, it works pretty nicely, but when I click on the same object again, it gets deselected. It makes sense in some cases, but for my use-case, it doesn't. Since I'm also providing the ability to drag/grab the object and move it around with the mouse, it's weird how it always gets deselected whenever the user moves it a little bit, so they have to click it again.
I couldn't find a property or option where this behavior could be modified. In fact, I can barely find any documentation on this component, except for some examples I could find on codesandbox.
Provide an attribute, something like deselectOnSecondClick={false}, which would prevent the above mentioned behavior. Of course, when someone clicks the object with the "shift" key being held, it would make sense for my use-case as well, to deselect the clicked object on the second click, so there might be multiple attributes/properties required to satisfy all the use-cases...
The text was updated successfully, but these errors were encountered:
three
version: 150.1@react-three/fiber
version: 8.12.0@react-three/drei
version: 9.62.2node
version: 18.15.0npm
(oryarn
) version: 9.5.0Problem description:
When I select an object using the
<Select>
component, it works pretty nicely, but when I click on the same object again, it gets deselected. It makes sense in some cases, but for my use-case, it doesn't. Since I'm also providing the ability to drag/grab the object and move it around with the mouse, it's weird how it always gets deselected whenever the user moves it a little bit, so they have to click it again.I couldn't find a property or option where this behavior could be modified. In fact, I can barely find any documentation on this component, except for some examples I could find on codesandbox.
Relevant code:
https://codesandbox.io/s/ny3p4?file=/src/App.js:475-483
Suggested solution:
Provide an attribute, something like
deselectOnSecondClick={false}
, which would prevent the above mentioned behavior. Of course, when someone clicks the object with the "shift" key being held, it would make sense for my use-case as well, to deselect the clicked object on the second click, so there might be multiple attributes/properties required to satisfy all the use-cases...The text was updated successfully, but these errors were encountered: