Skip to content

Commit

Permalink
docs(tree): add FAQ description valueMode = 'all' (#1970)
Browse files Browse the repository at this point in the history
* docs(tree): add `FAQ` description `valueMode = 'all'`

* chore: 优化 `FAQ` 标题

* chore: 修改翻译
  • Loading branch information
RSS1102 authored Oct 31, 2024
1 parent 4bdf9ce commit bc9f1b4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/web/api/tree.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,9 @@ Connects parent nodes in the tree with their child nodes at the same level. This
### Virtual Scrolling

{{ vscroll }}

## FAQ

### Why doesn't the `onChange` callback return the value of the parent node when child node is selected in `valueMode = 'all'` mode?

In `valueMode = 'all'` mode, the parent node will only appear in the selected values if all its child nodes are selected.
6 changes: 6 additions & 0 deletions docs/web/api/tree.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,9 @@ spline: data
### 虚拟滚动

{{ vscroll }}

## FAQ

### 为什么在 `valueMode = 'all'` 模式下,选中子节点时 `onChange` 回调并没有返回父节点的值?

`valueMode = 'all'` 模式下,必须当前子节点被全部选中后,父节点才会出现在选中值里面。

0 comments on commit bc9f1b4

Please sign in to comment.