Open cincolunes opened 4 weeks ago
three
@react-three/fiber
@react-three/drei
node
npm
yarn
The onChange() function of the Select component currently returns the previous value of the active state when multiple items are selected, and nothing when a single item is selected, due to the downed state interrupting its execution.
React.useEffect(() => { if (downed) onChange?.(active) else onChangePointerUp?.(active) }, [active, downed])
React.useEffect(() => { if (!downed) onChange?.(active) else onChangePointerUp?.(active) }, [active, downed])
I'm going to provide a PR with this one.
three
version: 0.151.0@react-three/fiber
version: 8.0.8@react-three/drei
version: 9.106.0node
version: 20.12.2npm
(oryarn
) version: 10.5.0Problem description:
The onChange() function of the Select component currently returns the previous value of the active state when multiple items are selected, and nothing when a single item is selected, due to the downed state interrupting its execution.
Relevant code:
Suggested solution:
I'm going to provide a PR with this one.