Commit dd3143e
authored
fix: Column and row count issues (#354)
## Description
This PR fixes 2 issues with column/row count in the sortable grid:
- Don't allow non-positive column/row count
- Fix invalid layout animation on android when column/row count changes
It also improves the column count change in the drag handle example -
adds layout animation to grid card dimensions.
## Example recordings
Example recording for column change on Android
| Before | After |
|-|-|
| <video
src="https://github.com/user-attachments/assets/a4a2e8fb-a46e-4726-817d-e9e636407348"
/> | <video
src="https://github.com/user-attachments/assets/5ef3c8d3-8eaa-4477-b0c4-2af63c2faca4"
/> |1 parent f794bbe commit dd3143e
2 files changed
Lines changed: 17 additions & 12 deletions
File tree
- example/app/src/examples/SortableGrid/features
- packages/react-native-sortables/src/components
Lines changed: 11 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
6 | 9 | | |
7 | 10 | | |
8 | 11 | | |
| |||
25 | 28 | | |
26 | 29 | | |
27 | 30 | | |
28 | | - | |
| 31 | + | |
29 | 32 | | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
34 | 39 | | |
35 | 40 | | |
36 | 41 | | |
| |||
Lines changed: 6 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
72 | 73 | | |
73 | 74 | | |
74 | 75 | | |
| |||
88 | 89 | | |
89 | 90 | | |
90 | 91 | | |
91 | | - | |
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| |||
0 commit comments