I am running into an issue where I need to restrict the available options but also allow duplicates in the selected list. I thought I was doing something wrong at first but then I looked into the code and saw that these two options are not allowed to coexist. I'm just trying to figure out why this is and how easy would it be to allow both options
if (allowDuplicates) {
// If we allow duplicates, all options will always be available
filterer = () => true;
} else if (available !== undefined) {
// If the caller is restricting the available options, combine that with the default
filterer = (option) => (
this.getFlatOptions(available).indexOf(option.value) >= 0 &&
this.getFlatOptions(selected).indexOf(option.value) < 0
);
}```
I am running into an issue where I need to restrict the available options but also allow duplicates in the selected list. I thought I was doing something wrong at first but then I looked into the code and saw that these two options are not allowed to coexist. I'm just trying to figure out why this is and how easy would it be to allow both options