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: ModelessDialogマウント時の警告を消したい #4790

Merged
merged 1 commit into from
Jul 18, 2024

Conversation

zoshigayan
Copy link
Contributor

Related URL

Overview

  • ModelessDialogコンポーネントをマウントすると findDOMNode が非推奨である旨の警告が表示されました
  • 原因はModelessDialogが依存している react-draggableDraggable コンポーネントがDOMの直接操作を行なっていることでした
    • READMEにも警告が発出される可能性について記載されていました
    • If running in React Strict mode, ReactDOM.findDOMNode() is deprecated. Unfortunately, in order for to work properly, we need raw access to the underlying DOM node. If you want to avoid the warning, pass a nodeRef ... (略)

  • 上記の記載に従い Draggable コンポーネントの操作対象となる要素の ref を渡して対処しています
    • 元々あった wrapperRef が適していると考えたため、そのまま利用しています
    • ローカル環境のstorybookでは今まで出ていた警告が出なくなっているのを確認できました

What I did

上記に同じです

Capture

スタイル・挙動に変更はありません

@zoshigayan zoshigayan self-assigned this Jul 18, 2024
@zoshigayan zoshigayan marked this pull request as ready for review July 18, 2024 07:30
@zoshigayan zoshigayan requested a review from a team as a code owner July 18, 2024 07:30
@zoshigayan zoshigayan requested review from AtsushiM and nabeliwo and removed request for a team July 18, 2024 07:30
Copy link
Member

@nabeliwo nabeliwo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🎉

Copy link
Contributor

@s-sasaki-0529 s-sasaki-0529 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 全部仕留めた気でいましたが、Modeless がまだありましたかー

@zoshigayan
Copy link
Contributor Author

ありがとうございます!マージしちゃいます〜〜

@zoshigayan zoshigayan merged commit e660533 into master Jul 18, 2024
8 checks passed
@zoshigayan zoshigayan deleted the avoid-find-dom-node-at-modeless-dialog branch July 18, 2024 07:52
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 this pull request may close these issues.

3 participants