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 optionRender #470

Merged
merged 12 commits into from
Mar 6, 2024

Conversation

crazyair
Copy link
Contributor

@crazyair crazyair commented Mar 4, 2024

No description provided.

Copy link

vercel bot commented Mar 4, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
cascader ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 6, 2024 4:08am

Copy link

codecov bot commented Mar 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.66%. Comparing base (f31fa63) to head (60abf9f).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #470   +/-   ##
=======================================
  Coverage   99.66%   99.66%           
=======================================
  Files          23       23           
  Lines         603      604    +1     
  Branches      173      174    +1     
=======================================
+ Hits          601      602    +1     
  Misses          2        2           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

src/OptionList/Column.tsx Outdated Show resolved Hide resolved
src/OptionList/Column.tsx Outdated Show resolved Hide resolved
src/Cascader.tsx Outdated
@@ -74,6 +74,7 @@ interface BaseCascaderProps<OptionType extends BaseOptionType = DefaultOptionTyp
id?: string;
prefixCls?: string;
fieldNames?: FieldNames;
optionRender?: (oriOption: { option?: OptionType }) => React.ReactNode;
Copy link
Member

Choose a reason for hiding this comment

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

这个已经叫 oriOption 了,那传入参数就不需要再包一层 object 了

Copy link
Contributor Author

@crazyair crazyair Mar 5, 2024

Choose a reason for hiding this comment

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

以后加 index、level 呢?留着口子行吗

@zombieJ zombieJ merged commit 1e95a21 into react-component:master Mar 6, 2024
11 checks passed
@crazyair crazyair changed the title feat: support option render feat: support optionRender Apr 19, 2024
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.

2 participants