-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rebuild DropZone so it accesses ref.current instead of querySelector (#…
…8545) ### WHY are these changes introduced? This is needed when removing the `useUniqId` from v11. ### WHAT is this pull request doing? - [x] Replace addEventListener with `useEventListener` hook - [x] Adjust types so that they work for all the different events - [x] Removes the child class component and moves it's logic into the parent - [x] Removes the `open()` `getElement` code and uses a ref for the input ### How to 🎩 - [ ] Thoroughly test the DropZone storybook examples in Firefox, Chrome and Safari - [ ] In particular make sure the `Upload` button works in `all-components-dropzone--with-custom-file-dialog-trigger` ### 🎩 checklist - [x] Tested on [multiple browsers](https://help.shopify.com/en/manual/shopify-admin/supported-browsers) - [x] Updated the component's `README.md` with documentation changes - [x] [Tophatted documentation](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting%20documentation.md) changes in the style guide --------- Co-authored-by: Aaron Casanova <[email protected]>
- Loading branch information
1 parent
8a4de81
commit 7c174e4
Showing
3 changed files
with
75 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@shopify/polaris': minor | ||
--- | ||
|
||
Updated DropZone with a signifigant restructure to remove Class child component |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters