- Bootstrap 4 is currently in beta so things can, and probably will
still change. Bootstrap 4 packages for DataTables won't be made
available until at least a beta release of Bootstrap 4.
- A few things have changed in Bootstrap 4 and rather than trying to
make the exisiting Bootstrap files work for both BS3 and BS4 it makes
sense to offer both. We'd need to detect which version of BS is loaded
and that can be quite unreliable (and delayed since the body would
need to be available).
- Pagingation requires a couple of classes, but no change in structure
- BS4 don't include icons any more, so need to use UTF8 arrows to show
sorting (don't particularly want other dependencies, although it is
easy to add with CSS if you want more icon control)
- Outstanding issue: The select element for paging control is not of a
consistent height with the search input. This appears to be a
Bootstrap issue: https://github.com/twbs/bootstrap/issues/17194
- F6 changes the paging control (for the better) to require that there
be no `a` tag for the elements which can't be clicked on in the pager.
Unforuntately F5 requires them, so we need to detect which one is to
be used. This is done using a meta tag based on this discussion:
- http://foundation.zurb.com/forum/posts/36681
- F5 remains the main version for the moment, but will be bumped to F6
when the next version of DataTables is released
- The scrolling body used to have the header content retained but
hidden, while the footer was just emptied. But if the footer content
is long enough to define the width of the column this results in
column misalignment.
- Fix is to treat the footer in the same way as the header is.
doesn't effect the DataTables demos since the inserts all have values
for this field. It is done for Editor which can use this table for
editing and it simplifies the MySQL aspect.
Rational for this is that the number renderer expects a number
input, not HTML, but if non-numeric input is given the value is just
returned (now escaped) - for example an empty string.
- This is so that Buttons (and others) can listen for this event and
create the buttons before the user init functions. Otherwise they
would need a setTimeoutout to be able to access the Buttons methods
immediately.
- Factory builder redesigned to pass in window and document to the
factory method, mandating a small update to the AMD and Browser
loaders
- Main change in is the CommonJS loader which can now optionally have a
window object passed in - if it is not passed in `window` will be used
(if this is the case in a CommonJS environment without a root object
being passed in an error will occur).
- DataTables caches a reference to the jQuery instance so the plug-ins
can easily reference jQuery while retaining their current return of
the module they define. This basically means that DataTables core will
include jQuery for the plug-ins.
- This does increase the core library size by ~160 bytes which is rather
frustrating, but I think this is the correct way to go about it
- With thanks to Evan Carroll for input on this:
https://github.com/DataTables/Plugins/issues/199
Fix: Force a column width if `dt-init scrollX` is specified and a column width is given. This can be overruled if the width given is too small for the content
- We already use the width attribute to determine if the table should
resize dynamically to 100% width, so it makes sense to use that when
scroll-x is enabled as well.
- This still isn't perfect as Chrome seems to change between a
box-sizing calculation depending if scrolling is required or not so
there can be a shift in column widths when changing between a
scrolling state and not (column visibility) which is ugly, but is
proving to be difficult to deal with.
to reproduce the error and it is only occuring on Chrome Mac with a
combination of the CSS in the DataTables demos specifically. This is an
edge case that I'd rather not add code for at the moment.
Fix: Chrome has an odd bug whereby the max-height needs a reflow in order to be correctly calculated - otherwise a gap could appear at the bottom of the table
- Haven't been able to reproduce the Chrome issue in a simple test case
- its something to do with the scrollbars being shown while the scroll
column calculations / updates are being done and then no longer
being needed ater that point.
Dev: Code style updated to match DataTables (unwritten!) standard
Dev: Removed some of the protection on the cell index update on row
delete - it is safe to assume that since we have a cell node, we've
assigned an index to it.
- Using just `datatables` would be difficult since I and others already
publish packages with that name. Anyone using those packages already
would run into real issues if I were to change their meaning and
contents!
- Cannot pass in a `dt` instance - will always use the one from the
jQuery instance given
- Don't check for reinitialisation or for jQuery when working in the
browser - will throw an error if in browser and no jQuery, which is
correct, DataTables needs jQuery
New: CommonJS will load jQuery if it wasn't passed in
Fix: Bootstrap, Foundation and jQuery UI integration Javascript files use module.exports correctly
Dev: Change the file include "function" name to not conflict with `require`
- AMD / RequireJS - The Require documentation strongly discorages using
a named module, but I've used this in the past as the plug-ins need a
name to depend upon themselves. This is still `datatables` but if the
developer is using Require and it resolves automatically to a
different name (which it may depending upon their configuration) they
can use a map option to map their name to `datatables`. See
https://github.com/moment/moment/issues/1095
- CommonJS - Based on the disscussion in
https://github.com/DataTables/Plugins/issues/199 it seems that some
developers like to pass a certain version of jQuery in. This
modification allows them to do so while retaining backwards
compatiblity.
- Integration files - The UMD wrapper for these files have been
restructured to be easier to follow. Also, based on the discussion in
the Plugins issue noted above you can now pass in a jQuery instance or
not and likewise a DataTables object or not.
- To avoid direct conflict with `require()` the build scripts have been
updated to use a "function" called `_buildInclude`. Ultimatily this
should really be updated to use grunt or similar.