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: Resolve console error when MenuItem uses popupClassName #606

Merged
merged 1 commit into from
Mar 27, 2023

Conversation

Yuiai01
Copy link
Contributor

@Yuiai01 Yuiai01 commented Mar 23, 2023

fix: ant-design/ant-design#41395

原因:由于在非 SubMenu 上使用了 popupClassName 属性,在整个过程中没有进行处理,最终该属性会被设置到 DOM 元素上去,但是 React 不识别 DOM 元素非标准的属性,因此出现报错。

解决方案:将 popupClassName 等一些未使用到的非标准的属性进行过滤。

@yoyo837
Copy link
Member

yoyo837 commented Mar 23, 2023

要不改成解构?

@codecov
Copy link

codecov bot commented Mar 23, 2023

Codecov Report

Merging #606 (6e7edea) into master (71af4b1) will not change coverage.
The diff coverage is 100.00%.

❗ Current head 6e7edea differs from pull request most recent head 7ea4d72. Consider uploading reports for the commit 7ea4d72 to get more accurate results

@@           Coverage Diff           @@
##           master     #606   +/-   ##
=======================================
  Coverage   99.85%   99.85%           
=======================================
  Files          26       26           
  Lines         710      710           
  Branches      194      191    -3     
=======================================
  Hits          709      709           
  Misses          1        1           
Impacted Files Coverage Δ
src/MenuItem.tsx 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@Yuiai01
Copy link
Contributor Author

Yuiai01 commented Mar 23, 2023

要不改成解构?

是改成这种的么?
image

@yoyo837
Copy link
Member

yoyo837 commented Mar 23, 2023

要不改成解构?

是改成这种的么? image

比起omit, 个人更喜欢这种, 还不依赖别的.

@ManiaJack
Copy link

同志们推进一下这个 PR 呗?

@zombieJ zombieJ merged commit fc7d9c4 into react-component:master Mar 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants