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

Issues with initializing semantic ui elements #197

Open
archigo opened this issue Mar 14, 2019 · 3 comments
Open

Issues with initializing semantic ui elements #197

archigo opened this issue Mar 14, 2019 · 3 comments

Comments

@archigo
Copy link

@archigo archigo commented Mar 14, 2019

I'm submitting a ...
[X ] feature request

Current behavior
When rendering a child component inside a modal, the elements are not rendered until the modal is opened. This means that calling the jquery initializer methods for semantic ui do not work in ngoninit etc. Instead you have to find an alternative way to call these after you are sure the modal has been shown the first time, such as :

this.ngxSmartModalService.getModal('xxxxx').open();   

if (this.isFirstModalShow) {
      this.isFirstMainShow = false;
      setTimeout(() => {
        this.childComponentInitSemanticUiElements();
      });
}

Note: The problem doesn't have anything specific to semantic ui, it's for anything where you want to access the dom elements from jquery.

Expected behavior
Just like there are events that fire after the modal has been closed, it would be practical to have events like "onOpened" and "onFinishedRendering" where you know the DOM elements are available.

@maximelafarie
Copy link
Owner

@maximelafarie maximelafarie commented Mar 28, 2019

Hi @archigo and sorry for the late answer.
I understood your issue and yes, we have to implement more events for opening.
Have you tried the existing one (onOpen)?

Cheers! 🖖

@archigo
Copy link
Author

@archigo archigo commented Apr 2, 2019

onOpen did not work for me unfortunately.

@maximelafarie
Copy link
Owner

@maximelafarie maximelafarie commented Dec 6, 2019

Sorry for the late answer @archigo. Did you find an alternative since you opened this issue? I was guessing about playing with classes and opacity of the modal or its content to avoid a such glitch... 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.