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

Issue: findDOMNode is deprecated in StrictMode. #11016

Closed
johnark88 opened this issue Oct 23, 2023 · 1 comment
Closed

Issue: findDOMNode is deprecated in StrictMode. #11016

johnark88 opened this issue Oct 23, 2023 · 1 comment

Comments

@johnark88
Copy link

Issue summary

When creating a <ResourceList> with selectedItems and onSelectionChange if you click the select all, remix throws an error. It only checks the the select all option, all other item checkboxes are empty. It does change the state setSelected, but the array now contains the amount of items. [1,2,3, etc] . It also throws the same error on an item checkbox click.

Expected behavior

It should select all checkboxes on click of the "select all" checkbox.

Actual behavior

On click of "select all" checkbox no other checkboxes are selected.

Screen.Recording.2023-10-23.at.10.04.36.AM.mov

Steps to reproduce the problem

  1. Create shopify remix app via CLI. (typescript)
  2. Create a route and import a ResourceList as a childComponent, with resourceItem
  3. Try the select all input checkbox

Reduced test case

WIP

Specifications

 System:
    OS: macOS 12.6.3
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Memory: 16.68 MB / 16.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 18.18.0 - ~/.nvm/versions/node/v18.18.0/bin/node
    Yarn: 1.22.19 - ~/Documents/Work/app-test/app-hydrogen-app/node_modules/.bin/yarn
    npm: 9.9.0 - ~/Documents/Work/app-test/app-hydrogen-app/node_modules/.bin/npm
  Browsers:
    Chrome: 117.0.5938.132
    Safari: 16.3
  npmPackages:
    @shopify/polaris: ^12.0.0 => 12.0.0
    @shopify/app": "3.49.7
    @shopify/shopify-app-remix: ^1.3.0
    react: ^18.2.0 => 18.2.0
    react-dom: ^18.2.0 => 18.2.0
    @remix-run/node: ^1.19.1
    @remix-run/react: ^1.19.1
    @remix-run/serve: ^1.19.1
schiller-manuel added a commit to schiller-manuel/polaris that referenced this issue Dec 14, 2023
this prevents the following deprecation warning:

```
Warning: findDOMNode is deprecated in StrictMode. findDOMNode was passed an instance of Transition2 which is inside StrictMode. Instead, add a ref directly to the element you want to reference.
```

fixes Shopify#11016
Copy link
Contributor

Hi! We noticed there hasn’t been activity on this issue in a while. After 30 days, it will close automatically.

If it’s still relevant, or you have updates, comment and let us know. And don’t worry, you can always re-open later if needed.

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

Successfully merging a pull request may close this issue.

1 participant