Text name (pagelength) on button shows double

Text name (pagelength) on button shows double

JohnDRJohnDR Posts: 2Questions: 0Answers: 0
edited September 2021 in Buttons

I'm new to datatables and still a novice when it comes to javascript, so probably it's something stupid...
Instead of page length as a select I want to use this feature as a button. Using the examples provided in the manual I've got something that works. However, it displays the information in the button twice.

I can see no errors debugging, only that it's placing the information twice in a span (see image):

For the record: the information shown in the console of the image is slightly different as it is taken from my homecomputer and not from codepen. And in the code I'm both using the select option and the button option to compare, eventually the select option will be dropped.

I recreated a simplified version on codepen:
https://codepen.io/JohnDR/pen/qBjjbRK

I'm not sure where to go from here, apart from that something must be messed up in my javascript? Any help will be greatly appreciated.

Thx,
John

Replies

  • allanallan Posts: 61,972Questions: 1Answers: 10,160 Site admin

    Hi John,

    Many thanks for the test case! Unfortunately, you've encountered a bug that we inadvertently introduced in v2. I've just committed a fix and we'll be rolling out Buttons 2.0.1 with the fix fairly soon (early this week).

    Allan

  • JohnDRJohnDR Posts: 2Questions: 0Answers: 0

    Hi Allan,

    Thank you for your time, dedication and swift solution!

    Regards,
    John

Sign In or Register to comment.