Commit 7c2a425
authored
refactor(iOS, Fabric): move updateFormSheetPresentationStyle to updateProps (#2952)
## Description
Previously, `updateFormSheetPresentationStyle` was called from
`finalizeUpdates` every time it was called, which would run many times
when the sheet was being dragged. This impacted performance and was the
cause of the bug which was fixed in
#2935 by
introducing a flag for setting initial detent. Now, we are checking
`updateMask` in `finalizeUpdates` method. If the props have changed, we
call `updateFormSheetPresentationStyle`. We don't need the flag anymore
so I removed it as well.
Thanks to @lodev09 for [reporting the problem and suggesting possible
solution](#2935 (comment)).
## Changes
- remove `_sheetHasInitialDetentSet`
- check if props have changed using `updateMask` before calling
`updateFormSheetPresentationStyle`
## Test code and steps to reproduce
Run formSheet-related test screens in the example app, such as
`Test2543`, `TestFormSheet` (you can change `sheetInitialDetent` in the
file and save to see the update), `Test2877`.
## Checklist
- [x] Included code example that can be used to test this change
- [ ] Ensured that CI passes1 parent 033152c commit 7c2a425
1 file changed
+5
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
966 | 966 | | |
967 | 967 | | |
968 | 968 | | |
969 | | - | |
| 969 | + | |
970 | 970 | | |
971 | 971 | | |
972 | 972 | | |
| |||
1335 | 1335 | | |
1336 | 1336 | | |
1337 | 1337 | | |
1338 | | - | |
1339 | | - | |
| 1338 | + | |
| 1339 | + | |
| 1340 | + | |
| 1341 | + | |
1340 | 1342 | | |
1341 | 1343 | | |
1342 | 1344 | | |
| |||
0 commit comments