yadcf icon indicating copy to clipboard operation
yadcf copied to clipboard

request yadcf AND vs OR option for multi_select

Open louking opened this issue 5 years ago • 2 comments

I don't see any way to have the multi_select support AND (intersection) and OR (union, the default), with use option to choose AND or OR.

Consider the Tags column in http://yadcf-showcase.appspot.com/DOM_source_select2.html. I would like to see a toggle button (not sure the best text, maybe AND and OR as defaults, but even better if the text is configurable) for the user to set behavior. (Note I think toggle button with changing text would be more intuitive than checkbox, and not sure what text would be appropriate for checkbox)

In this case, assume Tags is multi_select and set to Tag1, Tag2. AND function would show only first two rows. OR function (default) would show all rows except 7 and 10.

louking avatar Jan 24 '19 21:01 louking

@louking you can achieve this with custom multi select (OR or AND) and with adding a checkbox / etc (like in exclude / regex you can control you custom function behavior. PR is welcomed, or maybe somewhere in the future I will add this

vedmack avatar Mar 30 '19 18:03 vedmack

I figured a change would be required to deal with this because it needs an additional checkbox, but I haven't looked at making a custom multi select or the example you cite.

Up to you if you want to cancel this. The feature is not urgent for us so I probably wouldn't get to it for a while.

louking avatar Mar 30 '19 21:03 louking