Skip to content
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(cascader): add itemPosition attr #1689

Merged
merged 1 commit into from
Dec 15, 2021
Merged

fix(cascader): add itemPosition attr #1689

merged 1 commit into from
Dec 15, 2021

Conversation

berber1016
Copy link
Contributor

No description provided.

@vercel
Copy link

vercel bot commented Dec 15, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/growingio/gio-design/3FfsU4KbrGLNqjedXH3D8sqsMXPx
✅ Preview: https://gio-design-git-fix-bugs-growingio.vercel.app

@codeclimate
Copy link

codeclimate bot commented Dec 15, 2021

Code Climate has analyzed commit 2b459a9 and detected 0 issues on this pull request.

View more on Code Climate.

Comment on lines +116 to 118
<Item {...option} strategy={itemStrategy} key={option.value}>
{renderedItem}
</Item>
Copy link

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)

@semgrep-app
Copy link

semgrep-app bot commented Dec 15, 2021

Semgrep was unable to comment inline on the following findings:

In src/list/Item.tsx:26-34

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


In src/cascader/Cascader.tsx:113-124

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


In src/list/Item.tsx:26-34

ref usage found, refs give direct DOM access and may create a possibility for XSS

Click a link below to tell your Security Team if this comment was:
👍 useful
👎 not useful (false positive)
🤔 confusing

How do I suppress this?

@zhuzilv zhuzilv self-requested a review December 15, 2021 13:49
@berber1016 berber1016 merged commit b554264 into master Dec 15, 2021
@berber1016 berber1016 deleted the fix-bugs branch December 15, 2021 13:50
@sonarcloud
Copy link

sonarcloud bot commented Dec 15, 2021

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

jack0pan pushed a commit that referenced this pull request Dec 16, 2021
# [22.7.0](v22.6.0...v22.7.0) (2021-12-16)

### Bug Fixes

* **cascader:** add itemPosition attr ([#1689](#1689)) ([b554264](b554264))
* **input-button:** fix input button active style ([#1679](#1679)) ([1f11cce](1f11cce))
* **popover:** add popover flip ([#1690](#1690)) ([513ee54](513ee54))
* **popover:** fixed popover flip ([#1692](#1692)) ([f062748](f062748))
* **property-picker:** 修改属性选择器分类导航使用新的tabs,可左右滑动 ([#1695](#1695)) ([b6508e0](b6508e0))

### Features

* **list:** add event param in the onClick ([#1693](#1693)) ([0feb381](0feb381))
* **popover:** support onContentClick event ([#1691](#1691)) ([6d8fef2](6d8fef2))
@jack0pan
Copy link
Member

🎉 This PR is included in version 22.7.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants