Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(picker-column): prevSelected is set to the correct value (#27458)
Issue number: resolves #21764 --------- <!-- Please do not submit updates to dependencies unless it fixes an issue. --> <!-- Please try to limit your pull request to one type (bugfix, feature, etc). Submit multiple pull requests if needed. --> ## What is the current behavior? <!-- Please describe the current behavior that you are modifying. --> The `prevSelected` returns the same value as `selectedIndex`. When a user has selected the first option then the second: - `prevSelected` returns `1` - `selectedIndex` returns `1` ## What is the new behavior? <!-- Please describe the behavior or changes that are being added by this PR. --> The `prevSelected` returns the index of the last selected option. When a user has selected the first option then the second: - `prevSelected` returns `0` - `selectedIndex` returns `1` ## Does this introduce a breaking change? - [ ] Yes - [x] No <!-- If this introduces a breaking change, please describe the impact and migration path for existing applications below. --> ## Other information <!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. --> Read the comment below regarding `toHaveReceivedEventDetail`.
- Loading branch information