Qediror warning !! prop "value"
-
Hello community!
i have an issue with Qeditor ;
this is my Html:<q-editor required v-model.trim="item.itemContent" @blur="$v.item.itemContent.$touch" :error="$v.item.itemContent.$error" />
and I get this error in my console
[Vue warn]: Invalid prop: type check failed for prop “value”. Expected String, got Null.
found in
—> <QEditor>
<QPage>I’d really try to add :value=“item.itemContent” but it still generate the same warning
any help! Thanks
-
Maybe a stupid question, but is
item.itemContent
definitely not null?Scott
-
@s-molinari no it’s not null because i use that in Update item form , that’s mean item is really full
-
can you please provide a codepen or jsfiddle showing us the whole component and your js
-
QEditor has an error prop? it seems like you are trying to implement vuelidate on it. I agree with @nothingismagick.
-
I also had this editor problem and i solved it like in: https://forum.quasar-framework.org/topic/3607/solved-qpopupedit-in-qtable-with-vuex-data-source-do-not-emitted-save-event/29
In data i have content_sv as a local var:
export default { mixins: [validation, rules], data() { return { content_sv: '',
that i populate with the data from API result:
this.content_sv = this.postEdit.content_sv
the on post to API i do the same:
async doUpdatePost(postEdit, level) { this.postEdit.content_sv = this.content_sv
maybe a bit hacky but it works.
Please tell me if there is a more correct way to solve this?