implement full width resize handler
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- typescript
- 領域
- frontend
調査の方向性
まず header.getResizeHandler() と、issue で説明されている ColumnSizingState の動作を確認します。フル幅のハンドラーが、現在の列とその後で最初にリサイズ可能な列の最小サイズを守りながらテーブル全体の幅を維持する方法を判断し、その後、再現可能な例と関連する既存の resize テストで動作を検証します。
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
The header.getResizeHandler() works well if the table is not full-width. But when working with full-width tables, it does not handle the ColumnSizingState properly.
Your minimal, reproducible example
none
Steps to reproduce
My idea is that we need full-width Resize Handler apart from normal Resize Handler when the table is full-width.
The normal Resize Handler updates the current column size in the ColumnSizingState, but full-width Resize Handler will update the size of both the current column and the next resizable column in the ColumnSizingState.
The logic is simple -->
- if there is ANY resizable column after the current column (not need be adjacent, meaning one of the next columns), update the current column size like normal resize handler, and also, update the size of the FIRST resizable column as many as amount of the width change in negative to keep the table width the same.
- if there is NO resizable column after the current column, do not update the current column size.
- while updating the
ColumnSizingState, respect the min width of the current column and the the FIRST resizable column in order to keep the column sizes in stable.
Expected behavior
I am volunteer to implement the full-width resize handler.
I want to get the package authors' idea and also others' about the way of implementation.
(assume we have a state variable for full width called isFullWidth)
Option-1
to create a separate resize handler --> header.getFullWidthResizeHandler()
the usage could be in the table:
<div
{...{
onMouseDown: isFullWidth ? header.getFullWidthResizeHandler() : header.getResizeHandler(),
onTouchStart: isFullWidth ? header.getFullWidthResizeHandler() : header.getResizeHandler(),
}}
/>
Option-2
to update the current getResizeHandler() having a parameter for full-width --> header.getResizeHandler(isFullWidth)
the usage could be in the table:
<div
{...{
onMouseDown: header.getResizeHandler(isFullWidth),
onTouchStart: header.getResizeHandler(isFullWidth),
}}
/>
After getting your opinions, I am going to proceed for the implementation and will make a PR.
How often does this bug happen?
None
Screenshots or Videos
No response
Platform
macos
react-table version
8.8.6
TypeScript version
4.9.4
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.6k
- フォーク
- 3.6k
- 平均マージ
- 5時間 55分
- マージ済み PR(30日)
- 3
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
TanStack/table のほかの issue
-
Median aggregation overflows for large finite middle values対応中かも @EnesKartal が 12 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
TanStack/table#6654 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
Column resize does not end if mouseup is missed (screenshot, switching tabs)対応中かも @lx3133584 が 13 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
メンテナーはふだん 1 日以内に返信
-
svelte-table: controlled expanded and pagination state resets straight after every change対応中かも @NickSpag が 28 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
TanStack/table#6640 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 38/100
TanStack/table#6601 · コメント 5 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Cast required to access custom options when defining a custom plugin/feature対応中かも @sorena-paydar が 59 日前に担当しました。 オープン
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
inference/go type/feature
難易度 1/5 1〜3時間 初心者へのやさしさ 72/100
anomalyco/opencode#65148 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
truapi-release
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
paritytech/product-sdk#529 ·
メンテナーはふだん 1 日以内に返信
-
Add: Mansudae TVオープンapproved check:passed streams:add
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
メンテナーはふだん 1 日以内に返信
-
[Perf] Canvas layer composition is quadratic: splitRenderLayers re-copies the node array per nodeオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
devlikeapro/waha#2369 ·
メンテナーはふだん 5 日以内に返信