forked from buefy/buefy
-
Notifications
You must be signed in to change notification settings - Fork 9
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
No plugins available on programmatically opened Modal #101
Labels
bug
Something isn't working
Comments
kikuomax
changed the title
[breaking change] Modal.open limitation
No plugins available on programmatically opened Modal.open
Sep 15, 2023
This was referenced Sep 15, 2023
kikuomax
changed the title
No plugins available on programmatically opened Modal.open
No plugins available on programmatically opened Modal
Sep 15, 2023
wesdevpro
pushed a commit
that referenced
this issue
Sep 16, 2023
#102) * feat(lib): add copyAppContext - `utils/helpers.js` introduces a new function `copyAppContext` that copies the context from an app to another app. This function is necessary to programmatically mount a component; e.g., Modal. * fix(lib): app context for programmatic Dialog - Fixes the issue that components and other plugins on the host app were not available on a programmatically opened `Dialog`. Copies the app context of the host app to a new Vue app mounting `Dialog`. `DialogProgrammatic` becomes a class and is associated with the host app. * fix(lib): app context for programmatic Loading - Fixes the issue that components and other plugins of the host app were not available on a programmatically opened `Loading`. Copies the app context of the host app to a new Vue app mounting `Loading`. `LoadingProgrammatic` becomes a class and is associated with the host app. * fix(lib): app context for programmatic Modal - Fixes the issue that components and other plugins on the host app were not available on a programmatically mounted `Modal`. Copies the app context of the host app to a new Vue app mounting `Modal`. `ModalProgrammatic` becomes a class and is associated with the host app. * fix(lib): app context for programmatic Notification - Fixes the issue that components and other plugins on the host app were not available on a programmatically mounted `Notification`. Copies the app context of the host app to a new Vue app mounting `Notification`. `NotificationProgrammatic` becomes a class and is associated with the host app. * fix(lib): app context for programmatic Snackbar - Fixes the issue that components and other plugins on the host app were not available on a programmatically opened `Snackbar`. Copies the app context of the host app to a new Vue app mounting `Snackbar`. `SnackbarProgrammatic` becomes a class and is associated with the host app. * fix(lib): app context for programmatic Toast - Fixes the issue that components and other plugins on the host app were not available on a programmatically opened `Toast`. Copies the app context of the host app to a new Vue app mounting `Toast`. `ToastProgrammatic` becomes a class and is associated with the host app. * fix(docs): programmatic Modal example - Removes workarounds in the example of a programmatically opened `Modal` because the issue that components and other plugins on the host app were not available on a programmatically opened `Modal` was fixed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Buefy allows you to programmatically open a
Modal
withcomponent
property which may contain a dynamically compiled component.Buefy for Vue 2 extends the global Vue instance to embed the specified component. So all the plugins loaded by the Vue instance are available from the embedded component.
On the other hand, Buefy for Vue 3 creates a brand-new Vue app to embed the specified component, and no plugins are available from the embedded component. This is due to Vue 3's lack of
extend
function.You can see a consequence of this breaking change in the following diff on
docs/pages/components/modal/examples/ExProgrammatic.vue
: kikuomax@06cd713The text was updated successfully, but these errors were encountered: