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 row

    if I use the @save function it looks like im only getting (value, initialValue)

    any ideas?


  • 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.


  • @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 object props or just props.row if you just want the row object like so @save="doSomething(props.row)".

  • Cool solution.


  • @metalsadman

    works like a charm, thanks!

  • glad to help.

Log in to reply