Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(iOS): fix animating
Switch
component value change (#46173)
Summary: This PR fixes animating controlled `Switch` component when it's initial value is set to `false` When initial value was set to `false`, `_isInitialValueSet` flag wasn't changed to `YES`, because `oldSwitchProps.value` &`newSwitchProps.value` were equal, which resulted in controlled `Switch` component being updated without animation on first value change This PR fixes it by moving setting `_isInitialValueSet` flag to the end of `updateProps` method ## Changelog: [IOS] [FIXED] - Fix animating Switch component value change in Fabric Pull Request resolved: #46173 Test Plan: 1. Open `Switch` example in `RNTester` 2. In `Change events can be detected` section press switch that is `off` by default 3. Switch under it should change with animation Reviewed By: javache Differential Revision: D62377771 Pulled By: cipolleschi fbshipit-source-id: 0213287c935db79a199b086ebb36a6979df03913
- Loading branch information