My selection tags are disabled even though I have them enabled. It’s connected to the dataset and the values are all correct.
import wixData from ‘wix-data’ ;
$w . onReady ( function () {
$w ( "#modFarmTags" ). onChange ( **function** () {
search ();
});
**function** search () {
**let** filter = wixData . filter ();
**let** modFarmIdx = $w ( "#modFarmTags" ). selectedIndices ;
**let** modFarmVal = $w ( "#modFarmTags" ). value ;
**if** ( modFarmIdx . length > 0 ) {
filter = filter . hasAll ( "modFarm" , modFarmVal )
$w ( "#dataset1" ). setFilter ( filter )
. then ( count )
} **else** {
$w ( "#dataset1" ). setFilter ( filter )
. then ( count )
}
I have multiple tags but for the sake of this post, I only included one.
What is wrong with the code? Thanks for any help in advance.