问题标签 [react-table-v7]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
reactjs - 使用 react-table v7 创建嵌套表
提前感谢您的帮助。
我要解决的问题是使用 react-table v7 创建一个表,并在该表中使用展开并显示另一个表,其中包含与第一个选择相关的数据,因为它附加在图像中。
这是图像的代码框示例,我想做同样的事情,但使用最新版本的 react-table,我尝试使用子组件,但这些只显示数据,而不是它们拥有的标题,因此我不能这样做排序,在子表中搜索
我试图在子组件中渲染另一个反应表实例,但看起来它总是停留在第一列:
有没有人有一个看起来像参考图像中的示例可以帮助我?
reactjs - 在 React-Table v7 中隐藏行
我使用 react-table v7 创建了一个表。在表格的顶部,我有一个复选框来显示和隐藏具有特定值的行。如何在 react-table v7 中实现这一点?
javascript - 如何在模块 react-table 中对反应表进行排序而不对第一行进行排序?
我已经使用 react-table 在 react 中实现了一个表。我还使表格的第一行变粘了。使用模块中已经提供的排序功能,使用 column.getSortByToggleProps() 我的第一行(粘性行)也得到排序。有没有一种方法可以使我的第一行不被排序并且第一行下面的所有行都被排序?
reactjs - React Table 7 唯一键警告的问题
我正在使用 React Table 7 来构建我的表格,并且表格呈现,但我收到警告Each child in a list should have a unique "key" prop.
我已在 headerGroup 映射和行中包含键,但仍然收到警告。错误似乎只指向第 137 行,我确实有一个钥匙
和我有的第176行:
我在哪里缺少钥匙?
桌子
错误:
typescript - TS2339:打字稿中 @type/react-table 的类型上不存在属性“单元格”
我使用@type/react-table
为我的表设置列,但我的 IDE 出现错误,抱怨Cell
类型不正确。我认为它是由Cell
可选类型引起的,@type/react-table
我该如何解决?
react-table - 如何从 v7 (React-Table) 中的列访问另一列的值
我在以前的版本中看到您可以使用以下方式访问它:
但是在 v7 中它不起作用。
reactjs - How do I get the Id when clicked on the first row in React JS?
I am pretty new to React and I was following a tutorial to build a react-table, but I wanted to go one step further and see if I can make the first row or cell clickable and get the ID of that cell. However, I am unable to achieve that. I am not sure if this has already been answered, but I could not find any answer.
App.js
Table.js
This is part of the API
Tbh I do not know what should be in the checkButton function, I have so many things to get the data, but I am unable to do so. I really appreciate your guidance. Thank you !
reactjs - React Table 7 在子组件中嵌套子组件
我正在使用反应表 7 来显示数据。数据包含几个嵌套对象。
例子:
我可以做主表(即事件级别)及其子组件(即操作),但是当我尝试为操作做一个子组件时,我有一个错误React.useCallback" cannot be called inside a callback. React Hooks must be called in a React function component or a custom React Hook function
表代码:
如何使用 React-Table 7 在子组件内创建子组件?
reactjs - 反应表列隐藏
总的来说,我对 React 和 Web 开发有点陌生。
我有一个场景,在 react 中创建一个表,并创建一个可以显示/隐藏 列的框,以及一个全选复选框,该复选框将显示或隐藏除“NAME_ID”列之外的所有列。我可以通过hook的解构调用中的useTable()
hook 和 方法来实现前面的部分。column.getToggleHiddenProps()
但我无法实现第二部分,我知道我们有,但除了所需的NAME_ID列getToggleHideAllColumnsProps()
之外,这不允许我这样做。
任何帮助或建议都会很棒!