docs: Add TreeSelect get parent in FAQ (#15834)

* add faq

* adjust url
This commit is contained in:
zombieJ 2019-04-03 18:20:01 +08:00 committed by GitHub
parent 6cefc09b9a
commit e1a1cdaa4d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 0 deletions

View File

@ -74,3 +74,9 @@ Any data whose entries are defined in a hierarchical manner is fit to use this c
| key | Required property (unless using `treeDataSimpleMode`), should be unique in the tree | string | - |
| title | Content showed on the treeNodes | string\|ReactNode | '---' |
| value | Will be treated as `treeNodeFilterProp` by default, should be unique in the tree | string | - |
## FAQ
### How to get parent node?
We don't provide this since performance consideration. You can get by this way: <https://codesandbox.io/s/wk080nn81k>

View File

@ -74,3 +74,9 @@ title: TreeSelect
| key | 此项必须设置(其值在整个树范围内唯一) | string | - |
| title | 树节点显示的内容 | string\|ReactNode | '---' |
| value | 默认根据此属性值进行筛选(其值在整个树范围内唯一) | string | - |
## FAQ
### 如何获得父节点信息?
从性能角度考虑,我们默认不透出父节点信息。你可以这样获得:<https://codesandbox.io/s/wk080nn81k>