This topic contains 7 replies, has 2 voices, and was last updated by Jai Jai 5 months ago.

Demo 11 – Metronic Datatable Issue

  • abayz
    abayz
    Participant

    Posts: 5
    Member Reply #17633

    Hello,

    I have some issue with demo 11 and metronic datatable. When I change display record data on datatable, it scrolled to the top page automatically.  But this issue was not happened on demo default themes. Demo default themes also scrolled automatically but only to the top of datatable. can you help me to check for this issue?

    Thank you

    Jai
    Jai
    Keymaster

    Posts: 2700
    Support Staff Reply #17646

    Hi 🙂

    Which page did you try?

    Are you able to reproduce it at the demo site?

    https://keenthemes.com/metronic/preview/?page=builder&demo=default

    Thanks

    abayz
    abayz
    Participant

    Posts: 5
    Member Reply #17653
    This reply has been marked as private.
    Jai
    Jai
    Keymaster

    Posts: 2700
    Support Staff Reply #17682

    Hi 🙂

    We will remove it. The auto scroll top is purposely been there to fix other things.

    You can check in datatable plugin source.

    updatePerpage: function(e) {
       e.preventDefault();
       if (Plugin.getOption('layout.height') === null) {
          // fix white space, when perpage is set from many records to less records
          $('html, body').animate({scrollTop: $(datatable).position().top});
       }

    We think this is not useful anymore. We will remove it in the next updates.

    Thanks

    • This reply was modified 5 months ago by Jai Jai.
    abayz
    abayz
    Participant

    Posts: 5
    Member Reply #17717

    Hello,

    Thank you for your help, it works. However, I still found same problem when clicked toggle–detail (appear when autoHide:true on mDatatable property). The page still auto scrolling to the top on mobile web browser and microsoft edge browser only. Can you help me where I can find this function? so I can remove it. Please also update this on next update.

    Thank you for your support

    Jai
    Jai
    Keymaster

    Posts: 2700
    Support Staff Reply #17736

    Hi 🙂

    The first fix does not work for autoHide toggle click.  We have to check it and will provide the fix in the future updates.

    Thanks

    abayz
    abayz
    Participant

    Posts: 5
    Member Reply #17744

    Hello,

    I found the problem. When mDatatable create <span style=”color: #555555; font-family: Hind, ‘Helvetica Neue’, Helvetica, sans-serif;”>toggle–detail, it will provide href=”#” :</span>

    …. .addClass(“m-datatable__toggle-detail”).attr(“href”,”#”).on(“click”,o).append(t(“<i/>”).css(“width”,”21px”) ….

    when I remove the ‘#’, it fix the problem. No more auto scrolling to the top, both on mobile web browser and Microsoft Edge. Please provide this fix on next update.

    Thank you

     

     

     

    Jai
    Jai
    Keymaster

    Posts: 2700
    Support Staff Reply #17770

    Hi 🙂

    Thanks for your feedback.

    Yes, we have removed that # sign from the < a > link, and the issue seems gone.

    We will add this fix to the next updates.

    Thanks

    • This reply was modified 5 months ago by Jai Jai.

You must be logged in to reply to this topic.