Closed developer-macrew closed 11 months ago
This is a js & css issue which makes it out of scope since the main purpose of the project is for server-side implementation.
Anyways, I think this is a common issue on the responsive plugin of dataTables. We encountered the same and we just ditched the responsive plugin in favor of some CSS tricks with horizontal scroll.
I think we made a workaround there where we forced dataTable to adjust the columns on screen resizes.
Also, I suggest you check datatables.net forum for possible solution:
table.columns.adjust();
This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.
This issue was closed because it has been inactive for 7 days since being marked as stale.
The issue reference from: https://github.com/yajra/laravel-datatables/issues/3040#issue-1836687221 Don't know how it was out of scope.
Aug 2023 Summary of problem or feature request The issue at hand pertains to the implementation of DataTables in a Laravel application with a focus on responsiveness. Upon making the table responsive by adding the appropriate classes (such as table and table-responsive), an unwanted white space emerges on the right side of the table. Additionally, the inclusion of (responsive: true) in the server-side configuration aids in achieving the desired horizontal scrolling functionality on smaller screens. However, the cells in the table exhibit fixed widths, thereby hindering their ability to expand and adapt to the full width on larger screens. image
Update:
This was handled by css but whenever I put 5 or less column in table it shrink to left like in screenshot, and it can not be handeled by css or any datatable JS, It is happening only with yajra datatable.
System details Operating System PHP Version: 8.2 Laravel Version 10.10 Laravel-Datatables Version 1.13.6