Skip to content
This repository has been archived by the owner on Jul 28, 2021. It is now read-only.

submenus stay in old status when i reload a new image #21

Open
ierover opened this issue May 8, 2020 · 5 comments
Open

submenus stay in old status when i reload a new image #21

ierover opened this issue May 8, 2020 · 5 comments

Comments

@ierover
Copy link

ierover commented May 8, 2020

1.2.0

Test Environment

Google Chrome, macOS

Current Behavior

1.do some action on the submenu, changed the submenu UI status
2.call loadImageFromURL to reload a new image to editor
3.reactive the menu last time i use
4.the pop up submenu still in the old UI status.......

for example:
1. i checked the Sepia checkbox on submenu of Filter
2. i called editorInstance.loadImageFromURL(url,name) , reloaded a new Image 
3. i opened Filter menu again, Sepia checkbox was still in checked status

i think it's not what user is expecting, but i have no way to change the behavior

Expected Behavior

Provide an instance method, which can initialize the Menu and Submenu

@crisilva95
Copy link

I have the same issue!

@russian-proger
Copy link

You can change a “key” prop after loading a new image. This can help, because react creates a new element, when its key has been changed

@crisilva95
Copy link

Thank you @russian-proger, it worked!

@russian-proger
Copy link

I’m pleased to help :)

@rwilson504
Copy link

rwilson504 commented Jun 23, 2020

@russian-proger Could you please give an example of how you would change a 'key' prop? I'm trying to use this in a React functional component.

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

No branches or pull requests

4 participants