Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Fix issue of not resetting to first page when applying filters #115

Merged

Conversation

ohltyler
Copy link
Contributor

@ohltyler ohltyler commented May 8, 2020

Issue #, if available:

Description of changes:

On the detector list page, if user is on a page other than the first page and applies a filter, it may show no detectors even if some exist with the filter applied. This is because the page is not reset to the first page when a filter is applied. This fixes that issue, and will reset the page to the first page for the 4 possible filter changes:

  1. Searching in search bar
  2. Filtering by detector state
  3. Filtering by index
  4. Searching by index

Before:

Screen Shot 2020-05-08 at 10 29 08 AM

After:

Screen Shot 2020-05-08 at 10 28 37 AM

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Copy link
Contributor

@yizheliu-amazon yizheliu-amazon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the change

Copy link
Contributor

@ylwu-amzn ylwu-amzn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for the fix

@ohltyler ohltyler merged commit 3875087 into opendistro-for-elasticsearch:master May 8, 2020
@ohltyler ohltyler deleted the fixEmptyFilter branch May 8, 2020 17:51
yizheliu-amazon pushed a commit that referenced this pull request May 8, 2020
* Reset to first page when filter change

* Add test case
yizheliu-amazon pushed a commit that referenced this pull request May 8, 2020
* Reset to first page when filter change

* Add test case
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants