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

[Overlay]全局配置Popup.v2会提示React does not recognize the shouldUpdatePosition prop on a DOM element #3812

Closed
xmsz opened this issue Mar 17, 2022 · 2 comments · Fixed by #4277

Comments

@xmsz
Copy link

xmsz commented Mar 17, 2022

Component

Overlay

Feature Description

import { Select, ConfigProvider } from '@alifd/next';

const Option = Select.Option;


ReactDOM.render(
  <div>
    <ConfigProvider
      defaultPropsConfig={{ 
        Popup: {
    v2: true,
  },
  Overlay: {
    v2: true,
  }}
                         }
    >
    <Select
    >
      <Option value="jack">Jack</Option>
      <Option value="frank">Frank</Option>
      <Option value="hugo">Hugo</Option>
    </Select>

    </ConfigProvider>
  </div>,
  mountNode
);

  • 这样配置会提示
iframeConsoleRunner-7549a40147ccd0ba0a6b5373d87e770e49bb4689f1c2dc30cccc7463f207f997.js:1 Warning: React does not recognize the `shouldUpdatePosition` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `shouldupdateposition` instead. If you accidentally passed it from a parent component, remove it from the DOM element.
    in div (created by Select)
    in t (created by p)
    in p (created by v)
    in t (created by ForwardRef)
    in div (created by ForwardRef)
    in ForwardRef (created by ForwardRef)
    in ForwardRef (created by v)
    in v (created by Popup)
    in Popup (created by Config(Popup))
    in Config(Popup) (created by Select)
    in Select (created by Config(Select))
    in Config(Select)
    in ConfigProvider
    in div
@bindoon
Copy link
Member

bindoon commented Mar 22, 2022

shouldUpdatePosition has been deprecated in v2, no need shouldUpdatePosition any more

@xmsz
Copy link
Author

xmsz commented Mar 22, 2022

shouldUpdatePosition has been deprecated in v2, no need shouldUpdatePosition any more

我代码里没用到shouldUpdatePosition,但我页面里有个分页组件

 <Pagination
        pageSizeSelector="dropdown"
        pageSizeList={[10, 20, 50]}
      />

这个组件会触发这个错误
https://github.com/xmsz/demo-20220322/

Drawer会触发Warning: [ needAdjust ] is deprecated at [ Popup v2 ], use [ needAdjust ] instead of it.,代码里没有needAdjust

或者说有没有一键开启所有组件v2的办法

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

Successfully merging a pull request may close this issue.

2 participants