Black Lives Matter. Please consider donating to Black Girls Code today.

Data Table set selected rows via callback output

Hi

I use a data table to show files I loaded in. I have a callback with an upload that feeds the filenames in the data of the data table and should tick the selected rows of this data table. I return a list for the selected rows but it is not accpted:

Invalid argument data[0] passed into DataTable with ID “files_table_id”.
Expected object.
Was supplied type array.

Why? The selected rows is a list. What shall I do?

@martin_engel

Selected rows of the DataTable is indeed a list of numbers (rows).

Can you share your code or at least a minimal example?

Hi @dimark

Sorry, for replying late. I had some IT issues. But the problem was solved in the meantime. I needed to out the list again into list brackets. I was just confused by the error message.