get index through popup-edit in data-table
-
Hi,
This is the purpose:
When i edit a input in a data table I want to be able to know what object/row is updated so i can modify the row in the datatable (change bg, add icons) and/or send a ajax request to store the row(s).Either by:
a) getting the row.__index from the datatable
b) getting the whole rowif I use the @save function it looks like im only getting (value, initialValue)
any ideas?
/Mathias
-
Just a wild guess, but possibly try the @hide event and catch the event itself (i.e. āeā as a method argument) along with using the @save event. That might give you something to work with.
Scott
-
@lunne
call a method with your scoped props as a parameter in either save, show or hide events (hide event will not fire tho if you used buttons in your popup edit).
ie.@save="doSomething(props)"
, then you can process the prop object, you can pass whole scoped objectprops
or justprops.row
if you just want the row object like so@save="doSomething(props.row)"
. -
Cool solution.
Scott
-
works like a charm, thanks!
-
glad to help.