[英]How to add new row to react-table
I know that this is a very basic question.我知道这是一个非常基本的问题。 But I couldn't find the answer by now.
但我现在找不到答案。 In my application, I will fetch some data as an array from my graphql server and directly render it using react-table.
在我的应用程序中,我将从我的 graphql 服务器获取一些数据作为数组,并使用 react-table 直接渲染它。 now I want to add a new row to this table.
现在我想在这个表中添加一个新行。 How should I do that?
我该怎么做? Thank you very much for your help
非常感谢您的帮助
data
object passed to useTable
(refetch data from graphql
server, triggering a useEffect
which fetches data or...).useTable
的data
object(从graphql
服务器重新获取数据,触发获取数据的useEffect
或...)。data
(append).data
中(追加)。 I think you should always keep the reference to the data
object.我认为您应该始终保留对
data
object 的引用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.