selectedRow vs selectedSourceRow

Hey all,

We have several bulk-action surfaces that validate table row selection before allowing an action, but the helper contract is not consistent.

in our apps different implementations use selectedRows vs selectedSourceRows, mutate the table selection in different ways, return different values, and show different notification behavior…

I would like to find the best way to how row selection validation should work.

so my question is, whats the difference between selectedRow vs selectedSourceRow ?

Hi,

selectedSourceRow = the original data from your query (all fields, even if not shown in the table)

selectedRow = the table’s version of the data (after mapping, formatting, computed columns)

I am sharing a few screenshots of a test table:

  • firstName + lastName exist only in selectedSourceRow

  • name (combined field) exists in selectedRow because it’s mapped in the table

So depending on what data you need to do validation use selectedRow or SelectedSourceRow.

Let me know if it makes sense.

yes, thanks!

1 Like