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

feat: support options #438

Merged
merged 8 commits into from
Mar 17, 2022
Merged

feat: support options #438

merged 8 commits into from
Mar 17, 2022

Conversation

zombieJ
Copy link
Member

@zombieJ zombieJ commented Mar 16, 2022

提供一个 options 方法(可能名字不太好?),目前仅仅是将 options 直接转换成 ReactNode。v5 后再重整这块。

@afc163 @chenshuai2144

Update:
rename to items

@codecov
Copy link

codecov bot commented Mar 16, 2022

Codecov Report

Merging #438 (eec3431) into master (5aeca9e) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #438   +/-   ##
=======================================
  Coverage   99.84%   99.85%           
=======================================
  Files          25       25           
  Lines         652      673   +21     
  Branches      169      175    +6     
=======================================
+ Hits          651      672   +21     
  Misses          1        1           
Impacted Files Coverage Δ
src/Divider.tsx 100.00% <ø> (ø)
src/MenuItem.tsx 100.00% <ø> (ø)
src/MenuItemGroup.tsx 100.00% <ø> (ø)
src/SubMenu/index.tsx 100.00% <ø> (ø)
src/Menu.tsx 100.00% <100.00%> (ø)
src/utils/nodeUtil.tsx 100.00% <100.00%> (ø)

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

@yoyo837
Copy link
Member

yoyo837 commented Mar 16, 2022

optionsMapper?

@zombieJ
Copy link
Member Author

zombieJ commented Mar 16, 2022

optionsMapper 是合意?

@yoyo837
Copy link
Member

yoyo837 commented Mar 16, 2022

提供一个 options 方法(可能名字不太好?)

这个

@zombieJ
Copy link
Member Author

zombieJ commented Mar 16, 2022

嗯,我是指 Mapper 这个意思啦。它本质还是一个 list,mapper 的话更像是将什么映射的感觉。出于性能考虑,未来其实也不会推荐语法糖了。

@zombieJ zombieJ merged commit adbfd23 into master Mar 17, 2022
@zombieJ zombieJ deleted the options branch March 17, 2022 04:09

export default () => (
<Menu
options={[
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

items?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants