Help with a knob inside datatable
-
hi everyone, i have a datatable in which i put a knob component in a column, when i get my service data and populate datatable the knob component seems ok, but when i try to change its value i get this error:
[Vue warn]: Error in event handler for “input”: “TypeError: Cannot set property value of #<Object> which has only a getter”
i understand that the model of the knob does not have a set method to change its value at least not inside the datatable…
My question is if is it correct/possible to have an input control inside datatable?, if so how can i achive it? where do i have to put that set method?
thanks for you time and help.
-
Hi,
Please write a jsfiddle with your case, and I’ll update it to make it work. If I forget about this thread, please ping me on Discord. Thanks.
-
thanks @rstoenescu, i did the jsfiddle: https://jsfiddle.net/peterPanParker/4cLpx12L/3/
I hadnt used jsfiddle before so i just forked one post you had made (i hope it doesnt mind you)…
just one additional note… in my real code i have a page, inside that page i am trying to use a component (which is the datatable with the knob) and maybe is my lack of knowledge about sub components and their relationship with their parent which is causing this error…anyway i appreciate your help
thanks -
I remember I already answered this, but anyhow. Posting again: https://jsfiddle.net/njvto8hq/
When in doubt, just print out{{ props }}
inside the scoped slots -
@rstoenescu thanks…