Tree freezes when used in controlled mode with `motion` and `expandAction="click"`
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 48/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- react, typescript
- 領域
- frontend
調査の方向性
リンク先の CodeSandbox にある App.jsx の再現から始め、basic-controlled と animation の例と比較してください。expandAction="click" と motion の両方が有効な場合の制御された展開の経路を、特にリーフをクリックした後について追跡してください。外部からの再レンダリングなしで、ノードを引き続き展開および折りたたみできれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Hi,
When using rc-tree in controlled mode, with some animations (with the motion prop), and with expandAction="click", then the Tree gets stuck whenever you click on a leaf.
When that happens, you can no longer expand or collapse the nodes.
The only way out is to trigger a re-render of the Tree by some external event, such as a drag-and-drop or clicking a button that changes the tree state.
This can be really troubling for the end user, as they think the app is broken.

Here is a codesandbox that reproduces the issue: https://codesandbox.io/s/lucid-frog-mks62z?file=/App.jsx
It is based on the basic-controlled example, to which I applied the following changes:
- Remove
onCheck,checkedKeys,onSelectandselectedKeysprops - Add
expandAction="click" - Add
motion={motion}with some style (from the animation example)
Steps to reproduce:
- Expand all nodes until you come to a leaf
- Click on the leaf title
- Nodes can no longer be expanded nor collapsed
rc-tree version: 5.7.0
Thanks for your help!
- 主要言語
- TypeScript
- スター
- 1.3k
- フォーク
- 491
- 平均マージ
- 42分
- マージ済み PR(30日)
- 2
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
react-component/tree のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 55/100
react-component/tree#1068 · コメント 1 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
react-component/tree#983 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
react-component/tree#937 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
react-component/tree#935 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
react-component/tree#929 ·
react-component/tree の issue をすべて見る
似ている issue
-
area/frontend good first issue kind/cooldown
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
voidzero-dev/oxc-angular-compiler#511 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
langchain-ai/deepagentsjs#898 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
anomalyco/models.dev#8509 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
bug documentation P2 UI/UX
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信