selectRow() is not working with findIndex

  • Goal:
    Add new item in table - new item should be selected after refreshing of table

  • Steps:

  1. I add new item in table with for
  2. Success event handler - table.refresh(), table.selectRow()
  3. select by index {{ AtlasSourcesTable.data.findIndex(item => item.id === createSource.data.id)}}
  4. Expected - new added item will be selected, now 1 row selected

I add item with ID - tes, Name - bes

Hi there,

Thanks for reaching out to us! I'm curious if using Target row by: Key
Then have the key chosen with code similar to this {{queryname.data.result[0].id}}
If needed, you can add a debounce to make sure the table is updated in time.

Does that work here?

Thanks for answer - i change logic of app - i add server-side pagination and now no need to select new items - but i try your suggestion in other apps - looks like it's works

Glad to hear it!

I'm also glad you were able to find your own workaround as well!
I believe you should be good to go from here! Feel free to reach out to here again if any other questions arise. For now, I'll move forward in closing this thread. Have a great day!