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

Feature request: Or filter #50

Open
ken-mills opened this issue Nov 9, 2020 · 3 comments
Open

Feature request: Or filter #50

ken-mills opened this issue Nov 9, 2020 · 3 comments
Labels
enhancement New feature or request

Comments

@ken-mills
Copy link

I realize I can input a custom filter for Or for example ~[dog|cat]. It would be great if that feature was available in the filter popup by selecting multiple values and then selecting apply. Currently, when I select a single value, the column is only filtered by that single value. Multiple selections is not an option.
Thanks so much.
--Ken

@cscan cscan added the enhancement New feature or request label Nov 9, 2020
@cscan
Copy link
Owner

cscan commented Nov 9, 2020

Yes, now the dialog just provides single-selection mode. I will think about it.

@ken-mills
Copy link
Author

I came up with a solution which does not require the user to type a regex expression each time. It appears to work for my use case while still supporting existing filter conditions. The fix opens the dialog with a brief instruction, then requires the user to select a filter condition prior to clicking one or more checkbox options, and then select apply. Let me know if you would like to review a pull request and update the instructions. I called the option:

thisOrThat: '| This Or That',

panelFilter dialog 2020-12-11 083512

panelFilter dialog 2020-12-11 083755

I added a new "|" filter condition and supporting filter function, case #10 to support uppercase. The checkboxes values are captured using v-model.

...panelFilter.vue

v-model="selectedFilters"
.
.
. 
if (this.selectedFilters.length === 1) {
 opt = this.inputFilterCondition + this.selectedFilters[0]
} else {
 if (this.inputFilterCondition === '|') {
   opt = "|" + this.selectedFilters.join("|")
 }
}

...VueExcelEditor

case this.columnFilter[k].startsWith('|'):
 filter[k] = {type: 10, value: this.columnFilter[k].slice(1).trim().toUpperCase()}
 break

@cscan
Copy link
Owner

cscan commented Jan 15, 2021

Let me think about it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants