Yajra Datatable head columns change alignment when clicked
Hi,
using Metronic Laravel 8.2.5 and self implementing Yajra Datatable, I found this "bug" for which when a head column (the title of a column) is clicked to apply its ordering on the table the head title switch from alignment lef to alignment right.
When clicked the title changes classes, however the two classes are called exactly the same but they come from different js files. One dictates align left while the other align right. I guess the correct behaviour to avoid switching is for the title to keep the original align left class but I don't know how to properly disable the class switching.
Maybe some one can help me?
I'll attach a screenshot of the two classes switching their places (circled in blue):
Thanks!
Replies (1)
Hi Lore Porre,
I apologize for the delayed response. It looks like there's a conflict in the CSS classes applied by the Yajra DataTables. By right, the plugins.bundle.js file should not contain DataTable-related code, as it is already separated into a distinct file located at /resources/mix/vendors/datatables/datatables.bundle.js.
The source file for the plugins.bundle.js file is /resources/mix/plugins.js.
Have you made any modifications to the /resources/mix/plugins.js file?
Thank you.