question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add dataTable Responsive label:Suggestion

See original GitHub issue

Hi, It would be nice if you can add dataTable Responsive : https://datatables.net/extensions/responsive/ I have add it in my project and It’s a great render. capture d ecran 2015-03-25 a 20 22 01

Also, a little fix for the search input field in mobile view : Add in css file this :

.form-control.input-sm {
    width: 100%;
}

It will prevent the field from overflow the block in mobile view.

Thank you for your great work 😉

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
Nightbrcommented, Mar 29, 2015

@t0n1zz Hi, i used Bower to include the plugin : You need to add this to you bower.json or use the command bower install

    "datatables-responsive": "~1.0.4",
    "datatables": "~1.10.5",

After link css and js asset to your html page :

<link href="styles/vendor/AdminLTE/css/datatables/dataTables.bootstrap.css" rel="stylesheet" type="text/css" />
<link href="bower_components/datatables-responsive/css/dataTables.responsive.css" rel="stylesheet" type="text/css" />

<!-- boostrapdatatable -->
<script src="bower_components/datatables/media/js/jquery.dataTables.js"></script>
<script src="scripts/vendor/AdminLTE/plugins/datatables/dataTables.bootstrap.js" type="text/javascript"></script>
<script src="bower_components/datatables-responsive/js/dataTables.responsive.js"></script>

And finally, create a table and attach the behavior with jQuery :

$('.dataTable').DataTable({
                        responsive: true,
                        autoWidth: false
                    });
 <table class="table table-bordered table-striped dataTable">
<thead>
 <tr>
   <th>...</th>
</tr>
</thead>
<tbody>
        <tr>
               <td>....</td>
        </tr>
</tbody>
</table>

That’s it!! Enjoy your responsive DataTable!

0reactions
vaishnavkokacommented, Jul 4, 2018

@Nightbr how did you add “is active”: active label of bootstrap in the datatable, can you just let me know?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Responsive - DataTables
Responsive is an extension for DataTables that resolves that problem by optimising the table's layout for different screen sizes through the dynamic insertion ......
Read more >
DataTables example - Responsive table extension
This example show Editor being used with the Responsive extension for DataTables. Responsive will automatically adjust the visibility of columns in your ...
Read more >
Responsive integration (Bootstrap) - DataTables example
Responsive integration (Bootstrap). FixedHeader will automatically work with the Responsive extension for DataTables. All you need to do is enable both options ...
Read more >
DataTables example - Responsive integration
When columns are hidden, Responsive can add a show / hide button to allow the end user to see the information from the...
Read more >
Where to add responsive value? — DataTables forums
I have an existing DT system, I've downloaded the new CSS and JS responsive files and i'm now wondering where to add the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found