FixedColumn problem with pagination (serverSide:true)

FixedColumn problem with pagination (serverSide:true)

brycebreedsbrycebreeds Posts: 1Questions: 1Answers: 0
edited May 8 in Free community support

datatables.min.js:16 Uncaught TypeError: Cannot read properties of undefined (reading 'anCells')

this is the error received when paging to page 2 on my table. Unfortunately i cannot post links to my table.

is this a know problem? can it be investigated?

Answers

  • kthorngrenkthorngren Posts: 21,449Questions: 26Answers: 4,975

    I was able to replicate the issue with this test case:
    https://live.datatables.net/yaroyala/4/edit

    @allan will need to take a look.

    Kevin

  • Charles_KBCharles_KB Posts: 1Questions: 0Answers: 0

    Hello I have the exact same issue when paging to page 2 :

    • fixedColumns are not fixed anymore
    • this error shows in console

    package.json :

    "dependencies": {
        "@eonasdan/tempus-dominus": "^6.9.5",
        "@popperjs/core": "^2.11.8",
        "autonumeric": "^4.10",
        "bootstrap": "^5.3",
        "bootstrap-icons": "^1.11",
        "datatables.net-fixedcolumns-bs5": "^5.0.0",
        "dropzone": "^5.5",
        "jquery": "^3.7",
        "jquery.scrollto": "^2.1",
        "tom-select": "^2.3.1"
    },
    "devDependencies": {
        "@symfony/webpack-encore": "^1.7.0",
        "@types/bootstrap": "^5.2.10",
        "@types/jquery": "^3.5.29",
        "@types/jquery-migrate": "^3.3.3",
        "core-js": "^3.0.0",
        "eslint": "^8.0.1",
        "eslint-config-standard": "^17.1.0",
        "eslint-plugin-import": "^2.25.2",
        "eslint-plugin-n": "^15.0.0 || ^16.0.0 ",
        "eslint-plugin-promise": "^6.0.0",
        "file-loader": "6.0.0",
        "jquery-migrate": "^3.4.1",
        "postcss": "^8.4.29",
        "regenerator-runtime": "^0.13.2",
        "sass": "^1.72.0",
        "sass-loader": "^12.0.0",
        "stylelint": "^16.3",
        "stylelint-config-standard": "^36.0",
        "stylelint-config-standard-scss": "^13.0.0",
        "stylelint-scss": "^6.2.1",
        "ts-loader": "^9.0.0",
        "typescript": "^5.4.2",
        "typescript-eslint": "^7.2.0",
        "webpack-notifier": "^1.6.0"
    },
    

    Thanks for your help

    Charles

  • allanallan Posts: 63,689Questions: 1Answers: 10,500 Site admin

    If you update to DataTables 2.0.8 the issue should now be resolved.

    Allan

  • eggyseggys Posts: 1Questions: 0Answers: 0

    I have same issue

    /*! FixedColumns 5.0.0
    * © SpryMedia Ltd - datatables.net/license
    */

    have you solve the problem? how?

  • kthorngrenkthorngren Posts: 21,449Questions: 26Answers: 4,975

    @eggys What version of Datatables are you using?

    Looks like the issue was fixed in the Datatables library not FixedColumns. Use the Download Builder to get the latest versions.

    Kevin

  • allanallan Posts: 63,689Questions: 1Answers: 10,500 Site admin

    @eggys I'd suggest you update to FixedColumns 5.0.3 and also update any other DataTables software you are using. If you still have a problem after that, post a link to a test case showing the issue, and I'll take a look.

    Allan

  • chocchoc Posts: 102Questions: 12Answers: 9
    edited October 14

    In @kthorngren 's test case, I also observe header misalignment issue. It would be appreciate that can have a look too.

    It seems that the padding is not the only cause of the misalignment!?

    In this post I thought it was related to the padding, but it seems that the main cause is the use of scrollX. (More generally, if the horizontal scrollbar is shown even when scrollX: false)

    https://live.datatables.net/yaroyala/53/edit?html,js,output

    (I updated to FixedColumns 5.0.3 in the test case)

    The issue occurs when you switching to different pages.
    Note that switching from page 1 to page 2 may not be enough to see the misalignment. I only see it clearly on page 3.

    Chrome Version 129.0.6668.101 (Official Build) (64-bit) on Win 10

  • allanallan Posts: 63,689Questions: 1Answers: 10,500 Site admin

    Thanks @choc.

    I can see it going the other way:

    Damn I hate column alignment issues. It is truly the worst part of maintaining DataTables.

    This was Firefox 128 / KDE.

    Allan

  • allanallan Posts: 63,689Questions: 1Answers: 10,500 Site admin

    Could you try the current nightly please? Make sure you include the query string so you don't get an old cached version.

    Allan

Sign In or Register to comment.