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

rc-trigger 修改行為導致 multi-select 下的 tag 無法運作 #706

Open
caasi opened this issue Jan 12, 2021 · 0 comments
Open

rc-trigger 修改行為導致 multi-select 下的 tag 無法運作 #706

caasi opened this issue Jan 12, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@caasi
Copy link
Contributor

caasi commented Jan 12, 2021

Version of library

Steps to Reproduce the Problem

  1. yarn storybook
  2. 打開 Form/Select/Tag

Expected Behavior

  • 可以看到靠多選來新增 tag 的 tag example

Actual Behavior

  • 發生錯誤: React.Children.only expected to receive a single React element child.

Other details

rc-trigger 現在靠 React.Children.only 來確保只傳進去一個子元件,於是不傳任何子元件( 0 個子元件)給 <Dropdown /><TagExample /> 就壞掉了。

而且單純傳一個空的元件給 <Dropdown /> 並無法修復失去功能的 <TagExample />

@caasi caasi added the bug Something isn't working label Jan 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant