react-component / select

React Select
https://select.react-component.now.sh/
MIT License
892 stars 452 forks source link

feat: add more props to TransBtn #983

Closed RexSkz closed 9 months ago

RexSkz commented 9 months ago

需求

在我们项目的 UI 需求中,需要通过 option 的 disabledvalue 来控制 icon 渲染,例如:

目前 menuItemSelectedIcon 支持传入一个函数,但其中的参数只有一个 { isSelected: boolean },这个 PR 将 valuedisabled添加进去,便于开发者使用。

如下图所示,第一条因为是 disabled 状态,所以右边的 icon 被设置为了 0.5 透明度。

image

影响面

vercel[bot] commented 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
codecov[bot] commented 9 months ago

Codecov Report

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

zombieJ commented 9 months ago

+ rc-select@14.9.0