DataTable Loading Message

DataTable Loading Message

knetadminknetadmin Posts: 47Questions: 1Answers: 0

How to Disable Loading.. Message

Replies

  • allanallan Posts: 61,732Questions: 1Answers: 10,110 Site admin

    Use the language.loadingRecords option and set it to be a single space (or an empty string if you use the nightly version of DataTables - there is a bug in the current release whereby there must be one or more characters...).

    Allan

  • knetadminknetadmin Posts: 47Questions: 1Answers: 0

    Hi Allan,
    i am trying to change loading message but not effect

  • allanallan Posts: 61,732Questions: 1Answers: 10,110 Site admin

    Can you show me the code you are using to change the loading message please? The example of:

      "language": {
         "loadingRecords": "Please wait - loading..."
      }
    

    should work well.

    Allan

  • knetadminknetadmin Posts: 47Questions: 1Answers: 0
    edited July 2015

    i added option to dtOptions
    .withOption('language',{
    loadingRecords: "Please wait - loading..."
    })
    to change loading message
    you can test in the same URL

  • tangerinetangerine Posts: 3,350Questions: 37Answers: 394

    'language',{ loadingRecords: "Please wait - loading..." }

    'language': ( colon not comma) ?

  • allanallan Posts: 61,732Questions: 1Answers: 10,110 Site admin

    In this case yes - @knetadmin is using The Angular-DataTables integration libraries which uses its own configuration functions rather than objects - abstracting out the DataTables configuration.

    From the Angular DataTables documentation you want to use the withLanguage method:

    withLanguage( {
      loadingRecords: "Please wait - loading..."
    } )
    

    for example.

    Allan

  • knetadminknetadmin Posts: 47Questions: 1Answers: 0

    Hi Allan,
    i used it but also displaying default message not mine

  • allanallan Posts: 61,732Questions: 1Answers: 10,110 Site admin

    Unfortunately the login link from before doesn't show me a DataTable. Could you possibly tell me how I can see the issue please?

    Allan

  • knetadminknetadmin Posts: 47Questions: 1Answers: 0

    Hi Allan,
    thanks for helping i found the solution : https://l-lin.github.io/angular-datatables/#/overrideLoadingTpl

    angular.module('showcase', ['datatables']).
    factory('DTLoadingTemplate', dtLoadingTemplate);
    function dtLoadingTemplate() {
    return {
    html: '<img src="images/loading.gif">'
    };
    }

  • allanallan Posts: 61,732Questions: 1Answers: 10,110 Site admin

    Good to hear you found a solution. I had no idea that the third party library was doing that!

    Allan

This discussion has been closed.