File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
example/storybook-nativewind/src/core-components/nativewind/grid Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -165,7 +165,7 @@ const Grid = forwardRef<React.ComponentRef<typeof View>, IGridProps>(
165
165
166
166
const childrenWithProps = React . Children . map ( children , ( child , index ) => {
167
167
if ( React . isValidElement ( child ) ) {
168
- return React . cloneElement ( child , { key : index } ) ;
168
+ return React . cloneElement ( child , { key : index , index : index } as any ) ;
169
169
}
170
170
171
171
return child ;
@@ -205,7 +205,7 @@ const Grid = forwardRef<React.ComponentRef<typeof View>, IGridProps>(
205
205
props ?. paddingEnd || props ?. paddingRight || props ?. padding || 0 ;
206
206
207
207
const gridWidth =
208
- event . nativeEvent . layout . width -
208
+ Math . floor ( event . nativeEvent . layout . width ) -
209
209
paddingLeftToSubtract -
210
210
paddingRightToSubtract -
211
211
borderWidthToSubtract ;
You can’t perform that action at this time.
0 commit comments