-
-
Couldn't load subscription status.
- Fork 594
Implement injectModalsContainer option #239
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
Conversation
|
It's arguable, i will approve the pr but the idea of modern frameworks is to make it less of black box and more declarative. This feature sells declarative way of doing things for black-boxy functionality. For example if something does not work, only you, me and God will know what is going wrong with lib. it is slightly vague example (it was only one line), but if you scale the example, you can see what i mean. For example, in react you will never do this kind of things and it is for a good, well-thought-through reason. |
|
Yeah I understand what you mean, there is a blurry line between "magic" and acceptable automation. Magic is not usually a good thing because it worsens debugging and understanding. In this case I think it's acceptable because interacting with the plugin should only be done when actually opening modals, and the bootstraping should be encapsulated to the init function, like any other vue plugin. What I am trying to achieve is calling If you think about it, injecting this is similar to what is already being done of injecting CSS styles. |
|
It's already documented but not implemented? Per documentation it should be possible to add the modal container to the body by using:
I get the following warning tho:
|
|
@dgroh it should be working, but it was added quite recently, so make sure to have version 1.3.16 or higher. If you have the correct version and it still doesn't work open an issue and I'll help you sort it out. |
|
Shit, i think i've published a new version to the artifactory instead of public npm >_<. My bad. |
|
From what I can tell, this seems to introduce issues with accessing instance properties like I'm happy to take a stab at making an edit to the README, but wanted to confirm that instance property accessibility issues were expected/known? |
|
@joshualyon I hadn't thought about that, but I'll look into it. If that's really the case I'll try to fix it instead of having to modify the README. There should be a way to make it compatible. |
I have been working with the library and it isn't clean having to add the
modals-containerall the time. With this option, it can be injected into the document once the plugin is loaded.