React Bootstrap Table - Iterate over an array of Objects for Datafield
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 25/100
- Issue 类型
- 功能
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- javascript, react
- 领域
- frontend
调研方向
从 dataField 文档以及表格现有的基于字符串的嵌套属性处理开始;将其与提供的对象数组示例进行比较。完成的标准是:表格配置可以表示所有匹配的属性数组,生成所请求的总数 5,并且相关行为已有文档说明和测试。
由索引模型根据 Issue 内容生成。
描述
This is a duplicate thread on the same issue which was not resolved.
https://stackoverflow.com/questions/64211929/react-bootstrap-table-iterate-over-an-array-of-objects-for-datafield
// This works only for the first item in the Array.
{
dataField: object.arrayOfObjects.[0].propertyInEachObject.length,
sort: true,
text: 'Datasets',
headerStyle: () => ({ width: COL_WIDTH.STANDARD }),
},
How can I make it work or all of them? I tried a regex solution but I am not good at them. Can someone help me, please? I looked at the Docs, but that property dataField takes a string, so I cannot assign a function to it.
Here is an example object, I am dealing with. And the result I am looking for is 5. The length of the 2 property arrays.
{
"object": {
"arrayOgObjects" : [
{
"property1": ["One", "Two"]
},
{
"property1": ["One", "Two", "Three"]
}
]
}
}
I see only object-object but not object-list mapping in the docs - dataField: 'address.postal'
Could someone please help me with this as I got stuck here for hours?
- 主要语言
- JavaScript
- 星标
- 2.2k
- 派生
- 758
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
AllenFang/react-bootstrap-table 的其他 Issue
-
难度 1/5 1 小时以内 新手友好度 65/100
AllenFang/react-bootstrap-table#2053 ·
-
难度 3/5 1-2 天 新手友好度 20/100
AllenFang/react-bootstrap-table#2144 · 1 条评论 ·
-
难度 4/5 3-5 天 新手友好度 20/100
AllenFang/react-bootstrap-table#2143 ·
-
难度 4/5 3-5 天 新手友好度 25/100
AllenFang/react-bootstrap-table#2142 ·
-
难度 3/5 1-2 天 新手友好度 25/100
AllenFang/react-bootstrap-table#2141 ·
查看 AllenFang/react-bootstrap-table 的全部 Issue
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 82/100
nodejs/node#66743 · 1 个 reaction ·
维护者通常 1 天内回复
-
enhancement good first issue help wanted
难度 2/5 1-3 小时 新手友好度 78/100
OWASP/cve-lite-cli#1335 ·
维护者通常 1 天内回复
-
Channels status: needs triage
难度 2/5 1-3 小时 新手友好度 70/100
mastra-ai/mastra#27093 · 1 条评论 ·
维护者通常 1 天内回复
-
category/development priority/P1 scope/ci-cd scope/testing status/ready-for-agent type/bug
难度 1/5 1 小时以内 新手友好度 72/100
QwenLM/qwen-code#14225 · 3 条评论 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 82/100