Skip to content

Conversation

theodorejb
Copy link
Contributor

Currently, adding a custom query method always resets the page. However, this is not always the desired behavior. For example, it may be necessary to add custom query methods as part of the init process without resetting the page (so that page links and bookmarks will work).

Additionally, the page should only be reset if the filter is not already applied. This allows navigation between pages when a filter is applied to work correctly with back/forward buttons.

Also, the page should only reset if the filter is not already applied
@JangoSteve
Copy link
Member

Thanks for this. A couple small things:

  • Lets call the argument skipPageReset, which will make it consistent with other similar arguments in other functions throughout dynatable.
  • Lets make the very last condition be a literal equality check (i.e. !== instead of !=, since we don't want to make assumptions about what the actual query function will be (so the only assumption being that two identical values are going to be considered identical). In other words, it's possible that a query function considers two values inequivalent that would still have != be false.

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