react-component / react-component/table

table components.header.cell 有导出表示唯一列的标志吗?

Open
#991 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
1.4k
Forks
618
Avg merge
10h 19m
Merged PRs (30d)
2

Description

我使用react-sortable-hoc 制作可拖拽排序列, 但是发现cell

  components={{
            header: {
              row: DraggableContainer,
              cell: Cell,
            },
          }}

const Th = SortableElement((props) => <th {...props} />)

const Cell = ({ className, style, ...restProps }) => {
  console.log('restProps', restProps) // 需要一个唯一的值 给index

  return <Th index={JSON.stringify(restProps.children)} {...restProps} />
}
image

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the components.header.cell customization entry point and trace the props shown in the Cell example. Check the existing documentation and tests for a stable per-column identifier; done means confirming whether one is exposed or defining the smallest documented API change with coverage.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.