-
Notifications
You must be signed in to change notification settings - Fork 31
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
fix(components): data testid #1661
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/growingio/gio-design/9KdQWuiSKpdiqhcsvRYWvBqRhFhF |
<Button.IconButton | ||
data-testid="filter-picker" | ||
{...rest} | ||
size="small" | ||
type={!localVisible ? 'text' : 'secondary'} | ||
> | ||
<FilterOutlined size="14px" /> | ||
</Button.IconButton> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is a good practice to avoid spreading for JSX attributes. This forces the code to be explicit about which props are given to the component. This avoids situations where warnings are caused by invalid HTML props passed to HTML elements, and further, it avoids passing unintentional extra props by malicious actors. Instead, consider explicitly passing props to the component.
Click a link below to tell your Security Team if this comment was:
👍 useful
👎 not useful (false positive)
🤔 confusing
This comment is advisory. You do not need to address it before merging this pull request.
(typescript.react.best-practice.react-props-spreading.react-props-spreading from Rule board)
In src/select/Select.tsx:116-127It is a good practice to avoid spreading for JSX attributes. This forces the code to be explicit about which props are given to the component. This avoids situations where warnings are caused by invalid HTML props passed to HTML elements, and further, it avoids passing unintentional extra props by malicious actors. Instead, consider explicitly passing props to the component. Click a link below to tell your Security Team if this comment was: In src/select/Select.tsx:95-112
Click a link below to tell your Security Team if this comment was: In src/past-time-picker/PastTimePicker.tsx:169-180It is a good practice to avoid spreading for JSX attributes. This forces the code to be explicit about which props are given to the component. This avoids situations where warnings are caused by invalid HTML props passed to HTML elements, and further, it avoids passing unintentional extra props by malicious actors. Instead, consider explicitly passing props to the component. Click a link below to tell your Security Team if this comment was: |
data-testid="filter-picker" | ||
{...rest} | ||
size="small" | ||
type={!localVisible ? 'text' : 'secondary'} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Button 有一个 active 属性
b3fa11f
to
b79a2b4
Compare
b79a2b4
to
0361818
Compare
Kudos, SonarCloud Quality Gate passed! |
## [22.5.2](v22.5.1...v22.5.2) (2021-12-13) ### Bug Fixes * **components:** data testid ([#1661](#1661)) ([d4f0c15](d4f0c15)) * **filter-picker:** fix container ([#1667](#1667)) ([366c3be](366c3be)) * **panel:** the title should be vertically centered with the icon when there is no description ([#1665](#1665)) ([12c98d5](12c98d5)) * **switch, modal:** fix style ([#1664](#1664)) ([6de60fe](6de60fe)) * **tab-nav:** 修复当tab文字超出时,折行溢出 ([#1662](#1662)) ([1ab5bf5](1ab5bf5)) * **table:** fix scroll-bar of table ([#1666](#1666)) ([fc27a58](fc27a58)) * **textarea:** update the style of textarea ([#1663](#1663)) ([ada7e49](ada7e49)) * **tree:** fix tree not ellipsis ([#1660](#1660)) ([83fdc80](83fdc80))
🎉 This PR is included in version 22.5.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
No description provided.