Open KRONTri opened 7 months ago
Similar to: https://github.com/primefaces/primereact/issues/6035 Probably a similar fix is needed.
Got the same issue. Seems to be that getOptionValue is called twice, where the result of the first is passed to the second. Causing it to not find the value.
Call stack: selectItem <- getOptionValue is called here onOptionSelect <- getOptionValue is called here onEnterKey onInputKeyDown
@melloware seems not to be similar.
You fixed #6035 in #6036 but this problem here is still there in 10.6.6
Reverting this change.
Describe the bug
Dropdown is empty as onChange event value property gets undefined if Dropdown has optionValue set.
Note: In the stackblitz I created two dropdowns. One with optionValue and one without. The one without is working as expected.
Reproducer
https://stackblitz.com/edit/vitejs-vite-tawz4r?file=src%2FApp.tsx
PrimeReact version
10.5.1
React version
18.x
Language
TypeScript
Build / Runtime
Vite
Browser(s)
Chrome 121
Steps to reproduce the behavior
1) Open dropdown (via mouse or tabbing) 2) Select a value with cursor keys 3) Press ENTER
Expected behavior
After pressing ENTER value change should be reflected.