0

I am trying to add a radio button at the end of a datatable row, so basically I need two selection option, one is the checkbox given by default which is shown at the very front of each row, and a radio button at the last of the row, I can insert a button but changing the column attribute type to 'radio' is not working for me.

{type: "radio", initialWidth: 50, typeAttributes: {
label: '', value: '' }}

enter image description here

2 Answers 2

1

radio is not a supported data type. You would need to make a custom data type, as written in the documentation under "Creating Custom Data Types".

5

Using: <lightning-dattable max-row-selection="1"> According to the lwc datatable documentation: Radio buttons are used when maxRowSelection is 1.

1
  • I needed both checkbox and radio, so extending the Datatable class and creating a custom radio button column is the right approach.
    – adnan_aust
    Jul 14, 2022 at 10:51

You must log in to answer this question.

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