Quasar: Dialog plugin - Provided props are no longer reactive

Created on 10 Nov 2020  路  3Comments  路  Source: quasarframework/quasar

Describe the bug
Previously, when Dialog was invoked with custom component, "Object like" forwarded props was automaticly reactive (maybe they were handled in Dialog state).

This is not a bug in fact (maybe it was an unwanted feature 馃ぃ ) but it was usefull !

Codepen/jsFiddle/Codesandbox (required)
1.14.x exemple https://codepen.io/daedalusdev/pen/GRqwJGz
1.13.2 exemple https://codepen.io/daedalusdev/pen/JjKeYVQ

To Reproduce
Steps to reproduce the behavior:

  1. Created a dialog with a custom form component
  2. Provide extra "Object like" forwarded props outgoing from a reactive state
  3. Object is not reactive and won't update fields, input, etc

Expected behavior
In previous version (ex: [email protected]) reactivity was automaticly applied

Platform (please complete the following information):
OS: *
Node: *
NPM: *
Yarn: *
Browsers: *
iOS: *
Android: *
Electron: *

bug

Most helpful comment

If you define the 'value' attribute( that will be binded to the input) inside the custom component instead of $q.dialog , and pass a prop to your custom component it will work again as before:
https://codepen.io/ontwikkelfabriek/pen/OJXroXR

All 3 comments

Hi,

Use the update() method on the returned Object. This is its purpose. An example of using it is: https://quasar.dev/quasar-plugins/dialog#Progress

Hi,

i'm not sure to understand.

In my exemple, the model is provided has a props to a children component (like a form in fact). So, the model's keys are automaticly managed with v-model. How my child component is supposed to notify the parent ?

Thanks.

If you define the 'value' attribute( that will be binded to the input) inside the custom component instead of $q.dialog , and pass a prop to your custom component it will work again as before:
https://codepen.io/ontwikkelfabriek/pen/OJXroXR

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Bangood picture Bangood  路  3Comments

mesqueeb picture mesqueeb  路  3Comments

slowaways picture slowaways  路  3Comments

alexeigs picture alexeigs  路  3Comments

lukadriel7 picture lukadriel7  路  3Comments