2

I have used lightning:datatable to show table data. This component's properties like maxRowSelection, showRowNumberColumn are not working. I am getting error

The attribute "maxRowSelection" was not found on the COMPONENT markup://lightning:datatable

LC source

<lightning:datatable data="{! v.allergyList }" columns="{! v.allergyListColumns }" keyField="id" onrowselection="{! c.getSelectedName }" maxRowSelection="1" />

Is any one faced same issue? Please suggest on this issue.

2
  • 2
    Please Share your code
    – am_Aravi
    Commented Jan 30, 2018 at 11:48
  • In the future, please edit your post with any clarifications.
    – Adrian Larson
    Commented Jan 30, 2018 at 13:01

1 Answer 1

4

make sure, that API version of the compoennt is 42.0 but not lower, as only with Spring '18 release those attributes are available

here is release notes about adding maxRowSelection attribute to lightning:datatable component

1
  • I am wondering why Salesforce didn't introduce it earlier. This attribute could be so helpful! Well, better late than never... Commented Feb 5, 2018 at 12:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .