Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Angular Material Sortable Table -- Sorting arrows not showing due to some global issue I couldn't troubleshoot, what am I missing?

I'm not trying to troubleshoot the sorting 'mechanism' in the controller, it's purely the fact that it's not showing up. To reach this conclusion I have started from a stackblitz where I configured the data loading and everything to work the same way as my main project. Everything works fine and the arrows show up even if there's no data in the table or anything configured for the sorting in the controller.

I've checked all stylesheets and imports and they are identical.

I have also copy-pasted the table in the view here on stackblitz with no other modifications than adjusting things for the 'displayed column' object in the controller so that it loads my data.

This copy-pasted table doesn't show the arrows at all and can't for the life of me find either an error or something wrong in the compiled source.

Due to this I'm convinced there's a global issue in my project but don't know where I haven't yet looked.

Edit 1:

  • Updated stackblitz with latest version of everything, sorting still works. Now versions match.
  • Dropped some icons in my project to make sure the material icons works/show up, they do, material icon is fine.
like image 457
SebastianG Avatar asked Sep 08 '25 11:09

SebastianG


1 Answers

I didn't import MatSortModule in app.modules --- such a stupid oversight on my side :(

like image 125
SebastianG Avatar answered Sep 10 '25 04:09

SebastianG