@hitesh0009/react-native-basic-form 1.1.8 → 1.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/Form.js CHANGED
@@ -10,7 +10,7 @@ export const Form = ({ data, gap_bwt_keyValue = 10, gap_bwt_keys = 12, lableStyl
10
10
  </Text>)}
11
11
  </View>)}
12
12
 
13
- <FlatList {...flatlistProps} data={data} keyExtractor={(item) => item.id} ItemSeparatorComponent={() => <View style={{ height: gap_bwt_keys }}/>} renderItem={({ item }) => (<View style={{ gap: gap_bwt_keyValue }}>
13
+ <FlatList {...flatlistProps} data={data} keyExtractor={(item, index) => { var _a; return (_a = item.id) !== null && _a !== void 0 ? _a : index; }} ItemSeparatorComponent={() => <View style={{ height: gap_bwt_keys }}/>} renderItem={({ item }) => (<View style={{ gap: gap_bwt_keyValue }}>
14
14
  {item.label && (<Text style={[styles.lable, lableStyle]}>{item.label}</Text>)}
15
15
 
16
16
  {item.input && (<View style={inputTextContainerStyle}>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hitesh0009/react-native-basic-form",
3
- "version": "1.1.8",
3
+ "version": "1.1.9",
4
4
  "description": "A lightweight, data-driven form renderer for React Native with fully controlled inputs and flexible styling.",
5
5
  "keywords": [
6
6
  "react-native",
package/src/Form.tsx CHANGED
@@ -64,7 +64,7 @@ export const Form: React.FC<FormProps> = ({
64
64
  <FlatList<FormItem>
65
65
  {...flatlistProps}
66
66
  data={data}
67
- keyExtractor={(item) => item.id}
67
+ keyExtractor={(item,index) => item.id ?? index}
68
68
  ItemSeparatorComponent={() => <View style={{ height: gap_bwt_keys }} />}
69
69
  renderItem={({ item }) => (
70
70
  <View style={{ gap: gap_bwt_keyValue }}>