function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Chad.PfrommerChad.Pfrommer 

Why does adding sorting to a lightning-datatable cause cell highlighting to behave so erratically?

Anybody know why adding sorting to a lightning-datatable causes cell highlighting to behave so erratically? Like, it stops handling the addition/removal of the slds-has-focus class to cells appropriately and you end up with several "highlighted" cells at the same time.

You can see it in the SF example here (https://developer.salesforce.com/docs/component-library/bundle/lightning-datatable/example) (choose "Datatable with Sortable Columns").  If you start alternating between clicking around various cells and sorting by the Age column you can see what happens.
ANUTEJANUTEJ (Salesforce Developers) 
Hi Chad,

I am checking this internally and will respond back on the thread once I have an update.

Thanks.