data-scrollY in DOM's table not working...

data-scrollY in DOM's table not working...

gonzauygonzauy Posts: 2Questions: 1Answers: 0
edited January 2016 in Free community support

I am guessing this is a bug, whey I try to set scrollY value as a data attribute it does not work. Other properties I set using same method work just fine.

My guess is that it is due to the "Y" uppercase.

My workaround has been to set the following line when initializing the database;

'scrollY': $(this).data("scrolly") ? $(this).data("scrolly") : '',

If I am right looks like an easy fix, even though workaround above works fine I would love to remove it and keep using standard.

Regards,
Gonzalo.

Answers

  • AbyssUKAbyssUK Posts: 1Questions: 0Answers: 0

    Hi there i know this is an old thread but i thought I'd post as I got this to work to save other people the trouble.

    scrollY changes to data-scroll-y when used as a data attribute and the string to parse must be in square brackets and double quoted.

    data-scroll-y = "["300px"]"
    

    Hope this helps,

  • allanallan Posts: 61,787Questions: 1Answers: 10,115 Site admin

    It seems to work without that for me: http://live.datatables.net/bavafimu/1/edit .

    It shouldn't really need the square brackets, which would suggest an array.

    Allan

This discussion has been closed.