有人可以建议任何反应原生的数据表组件,它可以动态添加行并具有可编辑的单元格。我在谷歌搜索完成。提前谢谢。
答案 0 :(得分:0)
请找到 React Native数据表
的可用包答案 1 :(得分:0)
我为此功能引入了自己的库!
import DataTable, {COL_TYPES} from 'react-native-datatable-component';
const someCom = () => {
//You can pass COL_TYPES.CHECK_BOX Column's value in true/false, by default it will be false means checkBox will be uncheck!
const data = [
{ menu: 'Chicken Biryani', select: false }, //If user select this row then this whole object will return to you with select true in this case
{ menu: 'Chiken koofta', select: true },
{ menu: 'Chicken sharwma', select: false }
]
const nameOfCols = ['menu', 'select'];
return(
<DataTable
onRowSelect={(row) => {console.log('ROW => ',row)}}
data={data}
colNames={nameOfCols}
colSettings={[{name: 'select', type: COL_TYPES.CHECK_BOX}]}
/>
)
}
https://github.com/MuhammadRafeh/react-native-datatable-component