I am new to LWC and I'm trying to learn by converting an older Aura component to a LWC. What I'm trying to do right now is conditionally add the "show-row-number-column" attribute to the lightning-datatable via JavaScript.
In Aura I could set showRowNumberColumn = "{! c.enableRowNumber}" (which would pull in true or false conditionally), but in the LWC it looks like I have to add or remove the whole attribute from the datatable not just set it to true or false. I've searched, but don't see any way to conditionally add or remove an attribute from the datatable. Would someone be able to point me in the right direction here?