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

fix(Pagination) detect existence of question mark in URL in order to use correct parameter separator when adding parameters to the URL #8

Merged
merged 2 commits into from
Dec 5, 2016

Conversation

joebordes
Copy link
Contributor

The ajax URL I use to retrieve data has parameters:

index.php?param1=val1&param2=val2....

so when the pagination code adds the "page" parameter with a hardcoded question mark it doesn't work correctly. I added an "if" to detect the existence of a question mark in order to set the correct parameter separator and it is working correctly in both case.

…use correct parameter separator when adding parameters to the URL
@Mevrael Mevrael merged commit 46d0013 into Mevrael:master Dec 5, 2016
@joebordes
Copy link
Contributor Author

I think you may have to update the datatable website also:

https://bunnyjs.com/examples/datatable/

* url=”string” - ajax URL without any params...

I think you can delete the "without any params"

Thanks for accepting the merge

@joebordes joebordes deleted the pagination_urlparamsep branch December 5, 2016 23:07
@Mevrael
Copy link
Owner

Mevrael commented Dec 5, 2016

Thanks.

Later BunnyURL there should be used since it is already a dependency for DataTable.

I've added to DataTable search option which is not documented yet. If you will need it just create input with name="search" within <datatable>.

P.S. Instead of var it is recommended now to use const or let. Here is good video explaining https://www.youtube.com/watch?v=sjyJBL5fkp8

@joebordes
Copy link
Contributor Author

That video was very enlightening. I take note.
Thanks :-)

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

Successfully merging this pull request may close these issues.

2 participants