Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82755

How to add default styling to datatable used inside Editor?

$
0
0

Description of problem:
When using "datatable" field type in Editor, datatable is created automatically without any special table classes. In BS5, table needs at least classs "table" to be nice. Is there a simple way to define default classses for those dynamically created tables?

This works fine, but maybe there's a bettter way:

eshopEditor.on('open', function() {
var table=eshopEditor.field('mx_eshopOrderItems').dt();
$(table.table().container()).find('table').addClass('table table-striped');
});


Viewing all articles
Browse latest Browse all 82755

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>