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

JS events on backend and frontend #207

Open
achchu93 opened this issue Dec 17, 2018 · 4 comments
Open

JS events on backend and frontend #207

achchu93 opened this issue Dec 17, 2018 · 4 comments

Comments

@achchu93
Copy link

Problem Description

First am not happy at all about the documentation. It is frustrated.

Atleast i guess this repo issues will help me. i have a select field in my module settings. i wanna make it select2JS enabled dropdown. if i just write it with the ID of the element it doesnt work due to field is not available when DOM loaded. So i wanna initialize it when module settings modal open. I dig through the entire code and i couldnt find one. If anyone knows events of the builder, please list it up. then it will easy to search and find.

@lots0logs
Copy link
Member

Hi, we actually do not have an event for that currently because custom controls are not supported yet. Support for custom controls is planned though there is no ETA that I can provide at this time. Sorry!

@xxtesaxx
Copy link

You can use a MutationObserver to listen for changes in the DOM. When the modal is opened, you can setup select2.

@achchu93
Copy link
Author

You can use a MutationObserver to listen for changes in the DOM. When the modal is opened, you can setup select2.

Yeah, that is the mechanism i use for now!

@alpezed
Copy link

alpezed commented Jul 3, 2019

Hi, I have the same issue here that i am using select2 field and it works on Classic builder but not in React JS enable builder, I tried to use MutationObserver but it wasn't able to work. Anyone can guide me please? Thanks

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

No branches or pull requests

4 participants