使用 optionLabelProp 自定义选中项, 无法通过外部依赖项更新选中项属性
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 25/100
- Issue 类型
- 缺陷
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- react, typescript
- 领域
- frontend
调研方向
首先在链接的 CodeSandbox 中复现该问题,使用第 86 行附近的 /src/App.tsx,以及配置了 optionLabelProp 的 Select。跟踪外部暗色模式更新如何传递到选中的标签。主题更改时选中项的文本颜色能够更新,即表示完成。
由索引模型根据 Issue 内容生成。
描述
场景:
自定义 Select 选中项后, 需要支持 dark mode 主题, Select 选中项文字样式跟随主题切换
问题:
外部感知到 dark mode 更新后, 尝试更新 Select 已 选中项 文字颜色, 结果更新失败
https://github.com/react-component/select/assets/26668179/8959036b-c68c-46e2-8394-c9e5fd216e0e
- 主要语言
- TypeScript
- 星标
- 938
- 派生
- 482
- 平均合并
- 15 小时 8 分钟
- 30 天内合并 PR
- 2
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
react-component/select 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 35/100
react-component/select#1216 ·
-
难度 2/5 1-3 小时 新手友好度 45/100
react-component/select#1159 ·
-
a11y 问题 未关闭
难度 3/5 1-2 天 新手友好度 35/100
react-component/select#1087 · 1 个 reaction ·
-
难度 3/5 1-2 天 新手友好度 25/100
react-component/select#1086 ·
-
难度 3/5 1-2 天 新手友好度 30/100
react-component/select#1082 · 1 条评论 ·
查看 react-component/select 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 75/100
vercel-labs/just-bash#464 ·
-
looksLikeSlug() is ASCII-only, so non-Latin entity slugs (e.g. Korean) skip exact match and collapse 未关闭
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 2/5 1-3 小时 新手友好度 65/100
-
难度 2/5 1-3 小时 新手友好度 65/100
-
难度 1/5 1 小时以内 新手友好度 90/100
TanStack/tanstack.com#1293 ·