docs: faq for internal API (#36643)

This commit is contained in:
二货机器人 2022-07-21 19:03:59 +08:00 committed by GitHub
parent 1180b61131
commit ad7df07680
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View File

@ -21,6 +21,10 @@ But in antd, `undefined` is treated as uncontrolled, and `null` is used as an ex
Note: For `options` in `Select-like` components, it is **strongly recommended not** to use `undefined` and `null` as `value` in `option`. Please use `string | number` as a valid `value` in `option`.
## Can I use internal API which is not documented on the site?
NOT RECOMMEND. Internal API is not guaranteed to be compatible with future versions. It may be removed or changed in some versions. If you really need to use it, you should to make sure these API is still valid when upgrading to a new version or just lock version for usage.
## `Select Dropdown DatePicker TimePicker Popover Popconfirm` disappears when I click another popup component inside it. How do I resolve this?
This is an old bug that has been fixed since `v3.11.x`. If you're using an older version, you can use `<Select getPopupContainer={trigger => trigger.parentElement}>` to render a component inside Popover. (Or other `getXxxxContainer` props)

View File

@ -21,6 +21,10 @@ title: FAQ
注意:对于类 `Select` 组件的 `options`,我们**强烈不建议**使用 `undefined``null` 作为 `option` 中的 `value`,请使用 `string | number` 作为 `option``value`
## 官方文档中没有提供的隐藏 API 我可以使用吗?
不推荐。对内接口不保证兼容性,它很可能在某个版本中因重构而移除。如果你确实需要使用,需自行确保版本升级时隐藏接口仍旧可用,或者锁定版本。
## 当我点击 `Select Dropdown DatePicker TimePicker Popover Popconfirm` 内的另一个 popup 组件时它会消失,如何解决?
该问题在 `3.11.0` 后已经解决。如果你仍在使用旧版本,你可以通过 `<Select getPopupContainer={trigger => trigger.parentElement}>` 来在 Popover 中渲染组件,或者使用其他的 `getXxxxContainer` 参数。