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

Add easy way to "select all" in multi-value subsetters #254

Open
jwildfire opened this issue Jun 3, 2019 · 3 comments
Open

Add easy way to "select all" in multi-value subsetters #254

jwildfire opened this issue Jun 3, 2019 · 3 comments

Comments

@jwildfire
Copy link
Contributor

Either add an "All" option at the top of the multi-select (and set that as the default), or add some kind of button/link in the label that selects all values when clicked.

[Based on feedback from @xni7]

@samussiah
Copy link
Contributor

@sibyllwangxxxx suggested the options in multi-select filter dropdowns be selected. Right now the options are not by default selected. This update would at least make the initial selections apparent to the user.

@samussiah
Copy link
Contributor

samussiah commented Jun 28, 2021

I tried out and really liked slim-select, a low-profile select framework: "slim-select": "^1.26.1"

    input.each(function (d, i, selection) {
        d.select = new SlimSelect({
            select: this,
        });
    });

    input.on('change', function (event, d) {
        // Update filter object with current selection.
        d.value = d.select.selected();

        // Flag records in the data that should be excluded.
        main.data.forEach((d) => {
            d.include = main.settings.filters.every((filter) => {
                return filter.value.includes(d[filter.var]);
            });
        });
    });

image

@samussiah
Copy link
Contributor

And as a select-all this option should work:

image

But it doesn't work as a deselect-all...

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

No branches or pull requests

2 participants