Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Form] Add type "ReactElement" support for error message #10136

Closed
1 task
lovekonakona opened this issue Apr 18, 2018 · 1 comment
Closed
1 task

[Form] Add type "ReactElement" support for error message #10136

lovekonakona opened this issue Apr 18, 2018 · 1 comment
Labels
Accept You are right, we should do that 💡 Feature Request help wanted The suggestion or request has been accepted, we need you to help us by sending a pull request.

Comments

@lovekonakona
Copy link
Contributor

  • I have searched the issues of this repository and believe that this is not a duplicate.

What problem does this feature solve?

I want to show some operates in error message when some error occur.
eg. In my project, when user type a wrong domain name, I need show a retrieve domain button.

image

What does the proposed API look like?

{
  message: [ReactElement | string | null]
}
@afc163 afc163 added 💡 Feature Request Accept You are right, we should do that help wanted The suggestion or request has been accepted, we need you to help us by sending a pull request. labels Apr 18, 2018
lovekonakona added a commit to lovekonakona/ant-design that referenced this issue May 7, 2018
@lovekonakona
Copy link
Contributor Author

I create a pull request, please review it. #10395

afc163 pushed a commit that referenced this issue May 8, 2018
…0395)

* Add feature: can use type ReactNode for message of rules (#10136)

* fix: Replace React.Fragment to span

* Add unit test for Form (Not passed)

* fix: unit test of Form

* fix: unit test of Form & remove demo

* fix: update unit test for Form

* Refine code for Form

* Add error check for getHelpMessage
@afc163 afc163 closed this as completed May 8, 2018
bors bot referenced this issue in mozilla/delivery-console Jun 4, 2018
177: Update dependency antd to v3.6.1 r=rehandalal a=renovate[bot]

This Pull Request updates dependency [antd](https://github.com/ant-design/ant-design) from `v3.5.4` to `v3.6.1`



<details>
<summary>Release Notes</summary>

### [`v3.6.1`](https://github.com/ant-design/ant-design/releases/3.6.1)
[Compare Source](ant-design/ant-design@3.6.0...3.6.1)
* 🐞 修复一个 Typescript 的编译错误。

---

* 🐞 Fixing a Typescript compilation error.

---

### [`v3.6.0`](https://github.com/ant-design/ant-design/releases/3.6.0)
[Compare Source](ant-design/ant-design@3.5.4...3.6.0)
* 🌟 `Form`'s error message now can be customized with ReactNode. [#&#8203;10136](`https://github.com/ant-design/ant-design/issues/10136`) [@&#8203;lovekonakona]
* 🌟 `List` support customized configuration for position of pagination. [#&#8203;10581](`https://github.com/ant-design/ant-design/pull/10581`) [@&#8203;zheeeng]
* 🌟 `Layout.Sider` now can be configured with `light` or `dark` theme. [#&#8203;10142](`https://github.com/ant-design/ant-design/issues/10142`) [@&#8203;pd4d10]
* 🌟 Ant Design official site now supports offline mode. [#&#8203;10625](`https://github.com/ant-design/ant-design/issues/10625`)
* 🌟 `Transfer` adding `style` and `operationStyle` props for further customization. [@&#8203;eduludi]
* 🌟 `Message` adds a promisfied interface to handle callback. [#&#8203;10421](`https://github.com/ant-design/ant-design/issues/10421`) [@&#8203;zhujinxuan]
* 🐞 Fix compilation issue with typescript@&#8203;v2.9.1 . [#&#8203;10729](`https://github.com/ant-design/ant-design/issues/10729`) [@&#8203;karol-majewski]
* 🐞 Fix a bug in `Menu` where outer menu item not highlighting while inner item is selected. [#&#8203;8666](`https://github.com/ant-design/ant-design/issues/8666`) [@&#8203;stonehank]
* 🐞 Affix `offsetBottom` not working. [#&#8203;10674](`https://github.com/ant-design/ant-design/issues/10674`)

---

* 🌟 `Form` 表单错误信息展示支持传入 ReactNode。 [#&#8203;10136](`https://github.com/ant-design/ant-design/issues/10136`) [@&#8203;lovekonakona]
* 🌟 `List` 组件支持指定分页器的位置。 [#&#8203;10581](`https://github.com/ant-design/ant-design/pull/10581`) [@&#8203;zheeeng]
* 🌟 `Layout.Sider` 支持 dark/light 主题定制。 [#&#8203;10142](`https://github.com/ant-design/ant-design/issues/10142`) [@&#8203;pd4d10]
* 🌟 支持 Ant Design 站点的离线模式。 [#&#8203;10625](`https://github.com/ant-design/ant-design/issues/10625`)
* 🌟 `Transfer` 新增 `style` 以及 `operationStyle` 属性配置样式。 [@&#8203;eduludi]
* 🌟 `Message` 增加 promise 化的回调接口。 [#&#8203;10421](`https://github.com/ant-design/ant-design/issues/10421`) [@&#8203;zhujinxuan]
* 🐞 修复编译时 typescript v2.9.1兼容性问题。 [#&#8203;10729](`https://github.com/ant-design/ant-design/issues/10729`) [@&#8203;karol-majewski]
* 🐞 修复 `Menu` 嵌套超过两层时选中最里层后对应最外层没有亮起问题。 [#&#8203;8666](`https://github.com/ant-design/ant-design/issues/8666`) [@&#8203;stonehank]
* 🐞 修复 `Affix` 组件 offsetBottom 无效问题。 [#&#8203;10674](`https://github.com/ant-design/ant-design/issues/10674`)

---

</details>




---

This PR has been generated by [Renovate Bot](https://renovatebot.com).

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accept You are right, we should do that 💡 Feature Request help wanted The suggestion or request has been accepted, we need you to help us by sending a pull request.
Projects
None yet
Development

No branches or pull requests

2 participants