有人可以建议任何数据表组件来进行本机反应,它可以动态添加行并具有可编辑的单元格。我在谷歌搜索完毕。提前致谢。
问问题
10023 次
2 回答
1
请找到适用于React Native 数据表的包
于 2017-06-26T11:22:18.347 回答
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
于 2021-08-05T05:47:50.537 回答