A table doesn't get updated when a defaultColumn changes
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
- #6587 @lx3133584 による — マージされずにクローズ
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- react, typescript
- 領域
- frontend
調査の方向性
提供されたCodeSandboxとuseReactTableの設定から始め、defaultColumnの初期サイズを200から50に変更する動作を再現します。列サイズ調整の実装を読み、defaultColumnの変更がcolumnResizeDirectionの場合とどのように扱われるかを比較します。完了条件は、レンダリングされたテーブルの列に更新後のデフォルトサイズが反映されることです。
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
I used one of your examples and added a defaultColumn with an initial size to the table, which works fine. However if the defaultColumn gets updated later on, this change doesn't get reflected in the actual size of the table columns.
So if we have the below code and I set the initial size to 100 and then in the useEffect I update it to 50, it will still remain 100 for the rendered table even if the table generated by the useReactTable gets the new value. I checked the same with columnResizeDirection and it works fine.
const [defaultColumn, setDefaultColumn] = React.useState({size: 200})
React.useEffect(() => {
setDefaultColumn({size: 50})
}, [])
const table = useReactTable({
data,
columns,
columnResizeMode,
defaultColumn,
columnResizeDirection,
getCoreRowModel: getCoreRowModel(),
debugTable: true,
debugHeaders: true,
debugColumns: true,
})
Your minimal, reproducible example
https://codesandbox.io/p/sandbox/reacttable-lycjfh
Steps to reproduce
As in description
Expected behavior
The size of the columns gets updated when the defaultColumn gets changed
How often does this bug happen?
Every time
Screenshots or Videos
No response
Platform
macOS Chrome
react-table version
8.11.6
TypeScript version
4.4.2
Additional context
No response
Terms & Code of Conduct
- I agree to follow this project's Code of Conduct
- I understand that if my bug cannot be reliable reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.
- 主要言語
- TypeScript
- スター
- 28.5k
- フォーク
- 3.6k
- 平均マージ
- 19時間 40分
- マージ済み PR(30日)
- 8
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
TanStack/table のほかの issue
-
Issue template renders `react-table`, not `TanStack/table`対応中かも @vishruthasgowda が 13 日前に担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
TanStack/table#6595 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 38/100
TanStack/table#6601 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Cast required to access custom options when defining a custom plugin/feature対応中かも @sorena-paydar が 14 日前に担当しました。 オープン
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
メンテナーはふだん 1 日以内に返信
-
`aggregatedCell` not typed against bound `cellComponents` in `createAppColumnHelper`対応中かも @cpruijsen が 25 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
bot:ai-assisted status:untriaged
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
midnightntwrk/midnight-js#1424 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
mksglu/context-mode#1268 ·
メンテナーはふだん 5 日以内に返信
-
Edit:オープンcheck:failed streams:edit
難易度 2/5 1〜3時間 初心者へのやさしさ 60/100
iptv-org/iptv#54352 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
[Table] reserveSelectedRowOnPaginate=false 时表头全选包含其他页数据対応中かも @dvd233 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
Tencent/tdesign-react#4416 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
area:widget bug
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
interledger/publisher-tools#894 ·
メンテナーはふだん 1 日以内に返信