datatables.net 2.1.2 → 2.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/js/dataTables.mjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! DataTables 2.1.2
1
+ /*! DataTables 2.1.3
2
2
  * © SpryMedia Ltd - datatables.net/license
3
3
  */
4
4
 
@@ -1217,7 +1217,7 @@ var _removeEmpty = function ( a )
1217
1217
 
1218
1218
  // Replaceable function in api.util
1219
1219
  var _stripHtml = function (input) {
1220
- if (! input) {
1220
+ if (! input || typeof input !== 'string') {
1221
1221
  return input;
1222
1222
  }
1223
1223
 
@@ -4678,7 +4678,7 @@ function _fnFilterData ( settings )
4678
4678
  */
4679
4679
  function _fnInitialise ( settings )
4680
4680
  {
4681
- var i, iAjaxStart=settings.iInitDisplayStart;
4681
+ var i;
4682
4682
  var init = settings.oInit;
4683
4683
  var deferLoading = settings.deferLoading;
4684
4684
  var dataSrc = _fnDataSource( settings );
@@ -4699,6 +4699,9 @@ function _fnInitialise ( settings )
4699
4699
  _fnDrawHead( settings, settings.aoHeader );
4700
4700
  _fnDrawHead( settings, settings.aoFooter );
4701
4701
 
4702
+ // Cache the paging start point, as the first redraw will reset it
4703
+ var iAjaxStart = settings.iInitDisplayStart
4704
+
4702
4705
  // Local data load
4703
4706
  // Check if there is data passing into the constructor
4704
4707
  if ( init.aaData ) {
@@ -4913,6 +4916,11 @@ function _processingHtml ( settings )
4913
4916
  */
4914
4917
  function _fnProcessingDisplay ( settings, show )
4915
4918
  {
4919
+ // Ignore cases when we are still redrawing
4920
+ if (settings.bDrawing && show === false) {
4921
+ return;
4922
+ }
4923
+
4916
4924
  _fnCallbackFire( settings, null, 'processing', [settings, show] );
4917
4925
  }
4918
4926
 
@@ -6169,8 +6177,7 @@ function _fnImplementState ( settings, s, callback) {
6169
6177
  }
6170
6178
  }
6171
6179
 
6172
- // Restore key features - todo - for 1.11 this needs to be done by
6173
- // subscribed events
6180
+ // Restore key features
6174
6181
  if ( s.start !== undefined ) {
6175
6182
  if(api === null) {
6176
6183
  settings._iDisplayStart = s.start;
@@ -9751,7 +9758,7 @@ _api_register( 'i18n()', function ( token, def, plural ) {
9751
9758
  * @type string
9752
9759
  * @default Version number
9753
9760
  */
9754
- DataTable.version = "2.1.2";
9761
+ DataTable.version = "2.1.3";
9755
9762
 
9756
9763
  /**
9757
9764
  * Private data store, containing all of the settings objects that are
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "main": "js/dataTables.js",
5
5
  "module": "js/dataTables.mjs",
6
6
  "types": "./types/types.d.ts",
7
- "version": "2.1.2",
7
+ "version": "2.1.3",
8
8
  "files": [
9
9
  "js/**/*.js",
10
10
  "js/**/*.mjs",
package/types/types.d.ts CHANGED
@@ -2759,13 +2759,13 @@ export interface DataTablesStatic {
2759
2759
  *
2760
2760
  * @param type The library needed
2761
2761
  */
2762
- use(type: 'lib' | 'win' | 'datetime' | 'luxon' | 'moment');
2762
+ use(type: 'lib' | 'win' | 'datetime' | 'luxon' | 'moment'): any;
2763
2763
 
2764
2764
  /**
2765
2765
  * Set the libraries that DataTables uses, or the global objects, with automatic
2766
2766
  * detection of what the library is. Used for module loading environments.
2767
2767
  */
2768
- use(library: any);
2768
+ use(library: any): void;
2769
2769
 
2770
2770
  /**
2771
2771
  * Set the libraries that DataTables uses, or the global objects, explicity staing
@@ -2774,7 +2774,7 @@ export interface DataTablesStatic {
2774
2774
  * @param type Indicate the library that is being loaded.
2775
2775
  * @param library The library (e.g. Moment or Luxon)
2776
2776
  */
2777
- use(type: 'lib' | 'win' | 'datetime' | 'luxon' | 'moment', library: any);
2777
+ use(type: 'lib' | 'win' | 'datetime' | 'luxon' | 'moment', library: any): void;
2778
2778
 
2779
2779
  /**
2780
2780
  * Utils