[Bug] group分组功能,当存在自定义组件时,分组渲染错位
Open
Nobody has claimed this yet.
bug
- Dominant language
- TypeScript
- Stars
- 3.7k
- Forks
- 486
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 16
Description
Version
1.9.4
Link to Minimal Reproduction
null
Steps to Reproduce
<div style={{ height: '100vh', width: '100vw' }}>
<ListTableSimple records={records} widthMode={'adaptive'} autoWidth={true} editCellTrigger="click" ReactDOM={ReactDom}
onReady={(e) => window.tableClass = e}
animationAppear='all'
defaultColWidth={80}
groupBy={'jsjd'}
groupTitleFieldFormat={(record, col, row, table) => {
console.log(record)
return record.vtableMergeName + '(' + record.children.length + ')';
}}
>
<ListColumn
field={'check'} headerType={'checkbox'}
cellType={'checkbox'} width={30}
/>
<ListColumn field={'bh'} title={'工程编号'} tree={true} width={90} />
<ListColumn field={'bjmc'} title={'工程名称'} editor={
inputEditor
} width={130} />
<ListColumn
field={'gcjb'}
title={'工程级别'}
width={'auto'}
>
<CommentComponent role={'custom-layout'} />
</ListColumn>
<ListColumn field={'gclx'} title={'工程类型'} width={90} >
<BrowserComponent role={'custom-layout'} />
</ListColumn>
<ListColumn field={'gczy'} title={'工程专业'} width={90} >
<BrowserComponent role={'custom-layout'} />
</ListColumn>
<ListColumn field={'jsjd'} title={'建设阶段'} width={90} />
<ListColumn field={'jsgm'} title={'建设规模'} width={140} />
<ListColumn
field="zx"
title="增量"
width={30}
cellType='checkbox'
/>
<ListColumn
field="opit"
title="操作"
width={80}
/>
</ListTableSimple>
</div>
1.9.4以后能显示group的内容了,但是还是会把自定义组件渲染出来,。。。
当存在自定义组件的时候,group会变成最近的一个自定义组件。。。我确定key没有问题,我打印的数据也是正常的,但是渲染出来的结果有问题
Current Behavior
null
Expected Behavior
null
Environment
- OS:window
- Browser:edge
- Framework:react18.0
Any additional comments?
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the supplied React 18 reproduction using ListTableSimple, ListColumn, and the custom CommentComponent and BrowserComponent elements. Trace how groupBy='jsjd' and groupTitleFieldFormat interact with custom components, then verify that grouped rows render in the intended positions without being replaced by the nearest custom component.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100