Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

data-page-size nor data-paging-size is respected #825

Open
davidsiaw opened this issue Sep 23, 2018 · 3 comments
Open

data-page-size nor data-paging-size is respected #825

davidsiaw opened this issue Sep 23, 2018 · 3 comments

Comments

@davidsiaw
Copy link

Version: 3.1.6

Both of these are used:

<table id="table0" data-paging-size="20">
$('#table0').footable({
			"paging": {
				"size": 20
			}
		});

And the table is still 10 rows high.

The data-paging-size attribute is utterly ignored.

Screenshot example:
thing

@davidsiaw
Copy link
Author

davidsiaw commented Sep 24, 2018

After some more experimentation it seems that calling

FooTable.get('#table0')

in the document.ready function will return undefined.

Strangely enough once the page has loaded the function will return the footable

Not only that, after I call

FooTable.get('#table0').pageSize(40)

The table page size now gets stuck at 40, regardless of what data-paging-size is set to or $('#table0').footable({paging:{size:}}) is set to

It seems to me that footable is remembering the size somehow and setting it to that instead. It also seems to initialize footable much later

@davidsiaw
Copy link
Author

I think its okay if footable does persist the settings but please document it and tell us how to override it or turn it off. This issue causes data-paging-size to seem like it is completely ignored.

@albu77
Copy link

albu77 commented Feb 1, 2019

Even If I'm coming late, as I got trouble to set the size of the pages I eventually look inside the localStorage and found footable is using it to persist which explain the above problem
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants