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

minor filter select enhancements #3933

Merged
merged 2 commits into from
Nov 28, 2017
Merged

minor filter select enhancements #3933

merged 2 commits into from
Nov 28, 2017

Conversation

kkalyan
Copy link
Contributor

@kkalyan kkalyan commented Nov 23, 2017

  • As of now, the max rows for filter select is hardcoded to 10K in the code, this PR makes the limit configurable.
  • If there an outstanding ajax request while fetching the filter select values, the previous request is canceled.

@kkalyan kkalyan changed the title adding config to limit max rows for filter select minor filter select enhancements Nov 23, 2017
Copy link
Contributor

@Mogball Mogball left a comment

Choose a reason for hiding this comment

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

@@ -41,6 +41,8 @@

ROW_LIMIT = 50000
VIZ_ROW_LIMIT = 10000
# max rows retrived by filter select auto complete
Copy link
Contributor

Choose a reason for hiding this comment

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

retrieved*

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done.

@@ -28,6 +28,7 @@ export default class FilterControl extends React.Component {
}));
this.state = {
filters: initialFilters,
xhr: null,
Copy link
Contributor

Choose a reason for hiding this comment

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

I would rename this to activeRequest or something more descriptive

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done.

$.ajax({
// if there is an outstanding request to fetch values, cancel it.
if (this.state.xhr) this.state.xhr.abort();
this.setState({ xhr: $.ajax({
Copy link
Contributor

Choose a reason for hiding this comment

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

please format this section of code

this.setState({
    xhr: $.ajax({
        ...
    })
});

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done.

@mistercrunch mistercrunch merged commit f9202ba into apache:master Nov 28, 2017
@Mogball Mogball deleted the config branch November 28, 2017 06:06
michellethomas pushed a commit to michellethomas/panoramix that referenced this pull request May 24, 2018
* `values_for_column` configurable row limit

* `FilterControl` cancels active ajax request if any
wenchma pushed a commit to wenchma/incubator-superset that referenced this pull request Nov 16, 2018
* `values_for_column` configurable row limit

* `FilterControl` cancels active ajax request if any
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.21.0 labels Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.21.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants