className default is lost when props.className is undefined in UncontrolledTabs
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 45/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- javascript, react
- 领域
- frontend
调研方向
从 UncontrolledTabs 组件开始,检查 default-props 对象的对象展开,并重现 props.className 被显式设置为 undefined 的情况。确认默认 "react-tabs" 类的预期行为,并验证该类仍会应用,同时不会破坏显式提供的 className。
由索引模型根据 Issue 内容生成。
描述
In the UncontrolledTabs component, default props are merged using object spreading:
const { className, ...attributes } = { ...defaultProps, ...props, };
Even the defaultProps.className is defined ('react-tabs') and props.className is explicitly undefined, the spread operation will overwrite the default and set className to undefined.
As a result, the default class name is lost. It's unclear whether this behavior is intended, but it can lead to unexpected issues, especially when upgrading from older versions where the default class was always applied. Projects relying on the default 'react-tabs' class for styling or selectors may break silently.
- 主要语言
- JavaScript
- 星标
- 3.1k
- 派生
- 455
- 平均合并
- 5 小时 9 分钟
- 30 天内合并 PR
- 2
贡献指南
这个仓库没有索引到贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
reactjs/react-tabs 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 25/100
reactjs/react-tabs#584 ·
-
难度 3/5 1-2 天 新手友好度 35/100
reactjs/react-tabs#571 ·
-
难度 4/5 3-5 天 新手友好度 35/100
reactjs/react-tabs#525 · 1 条评论 · 1 个 reaction ·
-
难度 3/5 1-2 天 新手友好度 35/100
reactjs/react-tabs#521 · 3 条评论 ·
-
难度 3/5 1-2 天 新手友好度 42/100
reactjs/react-tabs#507 · 1 条评论 ·
查看 reactjs/react-tabs 的全部 Issue
相似的 Issue
-
awaiting triage bug Causes friction Hop Gui P1 P2 Transforms
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 2/5 1-3 小时 新手友好度 70/100
georgestephanis/p2026#40 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
Margaret-Petersen/food-delivery-app-clone-react-native#1981 ·