New LWC Datatable Component!

For the latest on the Datatable component, please go here: Datatable – Lightning Web Component for Flow Screens

The datatable Flow Screen Component has been one of the most popular add-ons found on unofficialsf.com.  Admins have found many great use cases for the component and we have been able to add some nice updates to it as well.

One of the drawbacks to the component was the requirement to hard-code the Objects you wanted to display records from.  Starting in Summer ‘20, that restriction should go away for Flow components, if they are written as Lightning Web Components.  Unfortunately, the original datatable is written as a Lightning Aura Component.

I decided to start from scratch and create a brand new LWC datatable component.  I think it is easier to configure and use than the original component and it offers some great new features.

  • The only required attributes are the Record Collection and a list of field names
  • Lookup fields are displayed with the record name as a link rather than showing the Id  
  • You can restrict the number of records to be displayed in the table
  • Percent and Time fields now display correctly
  • When using inline editing, only the changed records are passed back to the flow
  • You can set overrides just for the columns you want for attributes like:
    • Alignment
    • Icon
    • Label
    • Width
    • Editability
  • You can easily add advanced attributes like CellAttributes and TypeAttributes
  • Advanced attributes can even use the values of other fields in the records

Until Summer ‘20, the new component still needs to have the Object hard-coded but I have included versions for 11 different Standard Objects and complete instructions on how to modify the component to create versions for other Standard and Custom Objects.

Please give the new component a try and let me know how it works for you.

Eric Smith