CDN version

CDN version

IT MarcariaIT Marcaria Posts: 13Questions: 5Answers: 1

Hello:
On page https://datatables.net/download/ version 1.10.19 does not appear

I think version 1.10.19 is not compatible with editor version 1.8.1, because I have not managed to use them together without error.

Than you.

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Hi @IT Marcaria ,

    DataTables 1.10.18 and 1.10.19 are actually the same - they just have different version numbers due a packaging error for npm. Both are compatible with Editor 1.8.1.

    What errors are you seeing? If you could link to your page, we're happy to take a look,

    Cheers,

    Colin

  • IT MarcariaIT Marcaria Posts: 13Questions: 5Answers: 1

    These are my css and js files

        <script type="text/javascript" src="/scripts/jquery-3.1.1.js" ></script>
        <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/dt/moment-2.18.1/jszip-2.5.0/dt-1.10.18/b-1.5.4/b-colvis-1.5.4/b-html5-1.5.4/fc-3.2.5/fh-3.1.4/r-2.2.2/rg-1.1.0/sl-1.2.6/datatables.min.css"/>
        <link rel="stylesheet" type="text/css" href="/css/DataTables/editor/generator-base.css">
        <link rel="stylesheet" type="text/css" href="/css/DataTables/editor/editor.dataTables.min.css">
        <link rel="stylesheet" type="text/css" href="/css/style.css">
        <script type="text/javascript" src="https://cdn.datatables.net/v/dt/moment-2.18.1/jszip-2.5.0/dt-1.10.18/b-1.5.4/b-colvis-1.5.4/b-html5-1.5.4/fc-3.2.5/fh-3.1.4/r-2.2.2/rg-1.1.0/sl-1.2.6/datatables.min.js"></script>
        <script type="text/javascript" charset="utf-8" src="/scripts/DataTables/editor/dataTables.editor.min.js"></script>
        <script type="text/javascript" charset="utf-8" src="/scripts/DataTables/editor/table.extensionlist.js?version=4"></script>
        <link rel="stylesheet" type="text/css" href="/css/Tooltips/tooltipster.bundle.min.css" />
        <script type="text/javascript" src="/scripts/Tooltips/tooltipster.bundle.min.js"></script>
        <link rel="stylesheet" href="/css/loadingstyle.css" />
    

    The editor is version 1.8.1:

    /*!
     DataTables Editor v1.8.1
    
     ©2012-2018 SpryMedia Ltd, all rights reserved.
     License: editor.datatables.net/license
    */
    

    The error occurs in the textbox of the filters, see image step1.jpg.

    The filter is created in a standard way:

                    this.api().columns(columnsIdx['extension.name']).every(function () {
                        var column = this;
                        var select = $('<br/><br/>Ends with:<br/><input type="text"></input>')
                            .appendTo($(column.header()))
                            .on('keyup', function () {
                                var val = $.fn.dataTable.util.escapeRegex(
                                    $(this).val()
                                );
    
                                column
                                    .search(val ? '' + val + '$' : '', true, false)
                                    .draw();
                            });
                    });
    

    However, if I go back to version 1.7.4 of the editor, together with version 1.10.16 of datatables, this error does not occur, but other bugs from previous versions are produced, such as line breaks can not be inserted in textarea (solved in 1.8.0).

    Editor: 1.8.1 --> 1.7.4
    Datatables:

        <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/v/dt/jqc-1.12.3/moment-2.18.1/jszip-2.5.0/dt-1.10.16/b-1.5.1/b-colvis-1.5.1/b-html5-1.5.1/fh-3.1.3/sl-1.2.4/datatables.min.css">
    
        <script type="text/javascript" charset="utf-8" src="https://cdn.datatables.net/v/dt/jqc-1.12.3/moment-2.18.1/jszip-2.5.0/dt-1.10.16/b-1.5.1/b-colvis-1.5.1/b-html5-1.5.1/fh-3.1.3/sl-1.2.4/datatables.min.js"></script>
    

    Thank you.

  • kthorngrenkthorngren Posts: 21,330Questions: 26Answers: 4,951

    The error occurs in the textbox of the filters, see image step1.jpg.

    This textbox is independent of Editor. The textbox is not a Datatables component although for every keyup the Datatables search api is called.

    Are you using server side processing (serverSide: true) enabled in your Datatables init code? If so this may explain the problem as each key typed will send an ajax request with the search term.

    If you are not using server side processing then I'm not sure why the input textbox would mis characters. We would need to see this to troubleshoot. Please post a link to your page or a test case replicating the issue.
    https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case

    One option might be to change the event handler to invoke on 'change' instead of 'keyup'.

    Kevin

  • IT MarcariaIT Marcaria Posts: 13Questions: 5Answers: 1

    Hi, I think this goes beyond datatables. It is a behavior that has to do with the rendering of the page when performing a search.
    For example, if you write extremely fast in the filters on the page https://datatables.net/extensions/fixedheader/examples/options/columnFiltering.html you will see that some characters are not written.

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Hi @IT Marcaria ,

    How about if you just put a standard input text element onto the page - does that behave the same? Or is this only with DataTable's input elements?

    Cheers,

    Colin

  • kthorngrenkthorngren Posts: 21,330Questions: 26Answers: 4,951

    For example, if you write extremely fast in the filters on the page https://datatables.net/extensions/fixedheader/examples/options/columnFiltering.html you will see that some characters are not written.

    I tried replicating the typing behavior on this page but did not see missing characters. Multiple times I would drag a finger across a row on the keyboard and all the characters appeared. I tried typing quickly searches that would work like account multiple times and never missed characters.

    Wonder if its related to a particular browser? I'm using Chrome on the Mac. What browser are you using? Have you tried different browsers?

    Kevin

  • IT MarcariaIT Marcaria Posts: 13Questions: 5Answers: 1

    For example, on this page if I write fast, not all the characters are written:
    https://datatables.net/extensions/fixedheader/examples/options/columnFiltering.html

    Image:

    But on this other page if it write all the characters although you write fast:
    https://datatables.net/examples/api/multi_filter.html

    Image:

    Something is different.

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    I'm definitely not seeing this problem on the datatables.net pages - can you give more information about your environment, please - such as OS, browser, etc

  • IT MarcariaIT Marcaria Posts: 13Questions: 5Answers: 1

    The following video shows that the text "lalala" is not written on the first page, but that it is written "llala", but on the second page if the full text is written, despite the speed with which it is written:

    https://www.marcaria.com/temp/delayontyping.mp4

    Environment data:
    SO: Windows 10 Enterprise Version 1809
    Browsers:

    • Google Chrome 72.0.3626.121 (Build oficial) (64 bits)
    • Firefox Quantum 65.0.2 (64-bit)
    • Internet Explorer 11 11.316.17763.0
  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Hi @IT Marcaria ,

    Ah, I am seeing that - oddly enough, typing "asd" fast works, but "lala" doesn't - I guess it's just a slight difference in speed - quite fast for "lala" as opposed to really fast for "asd"!

    I'll take a deeper look and report back,

    Cheers,

    Colin

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin

    Its going to be due to this I think. I'm not certain what the right thing to do to fix this will be I'm afraid. i'll need to have a bit of a think about it.

    Allan

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin

    Yes, 3.1.4 introduced a bug fix for IE:

    Fix: When used with column filtering in the table header, IE would retain focus on the element, but key presses wouldn't do anything. This resolves that by initially blurring the element and then refocusing.

    which is that line of code I mentioned.

    As I say, I'm not sure what the ultimate fix is going to be here.

    Allan

This discussion has been closed.