Closed RexSkz closed 9 months ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
select | ❌ Failed (Inspect) | Sep 19, 2023 8:13am |
Merging #983 (70ec9a4) into master (b5fccbd) will not change coverage. The diff coverage is
n/a
.:exclamation: Current head 70ec9a4 differs from pull request most recent head a9d115f. Consider uploading reports for the commit a9d115f to get more accurate results
@@ Coverage Diff @@
## master #983 +/- ##
=======================================
Coverage 99.78% 99.78%
=======================================
Files 38 38
Lines 1373 1373
Branches 400 393 -7
=======================================
Hits 1370 1370
Misses 3 3
Files Changed | Coverage Δ | |
---|---|---|
src/OptionList.tsx | 99.33% <ø> (ø) |
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
+ rc-select@14.9.0
需求
在我们项目的 UI 需求中,需要通过 option 的
disabled
和value
来控制 icon 渲染,例如:isSelected
展示正常的 checkbox目前
menuItemSelectedIcon
支持传入一个函数,但其中的参数只有一个{ isSelected: boolean }
,这个 PR 将value
和disabled
添加进去,便于开发者使用。如下图所示,第一条因为是 disabled 状态,所以右边的 icon 被设置为了 0.5 透明度。
影响面
(props: MenuItemProps) => ReactNode
,而MenuItemProps
没有具体类型;ts 定义里面也没有固定类型