Selection Tag Stuck On

Hi Velocoders,
I’m hoping someone might have a quick solution to a problem.


I have a bunch of selection tags - however for some reason I can’t work out three buttons are stuck on. This is in the edit site page.
In settings management I’ve tried toggling the select by default function. Nothing appears to change with it.
Any thoughts?
Thank you kindly.
Tim.

Are you using code? (post it please).
Is the selectioTags element connected to a dataset? (describe the connections).

Hi J.D,
Thanks for your reply.
The code I’m working with is below. I’ve removed it and re-added it. However the buttons sticking seem to remain the same.

I have four tag groups - seasonsTags, liturgyTags, sacramentTags, saintsSolemnitiesFeastDayTags.
These are connected to the MusicResources dataset.
Every time I link the values to the dataset three buttons/tags remain checked: Ordinary, All Seasons, Responsorial Psalm. When disconnected they appear normal like all other buttons.

What I’m trying to do is filter a repeater using multiple tag groups.
And also filter/find items with a search bar.
Count the items found.
And use a reset button to start over/reset the tags and the repeater.

This is the vision for the page:

https://timothyhartcreativ.wixsite.com/timothyhart/musicresources-2

I’ve taken the code from a wix tutorial and played around with a number of other examples but can’t get it working.

And now with or without code - those three selection tags are stuck on.

Any wisdom would be greatly appreciated.

With gratitude and kind regards,
Tim.

import wixData from ‘wix-data’ ;

$w . onReady ( function () {

$w ( "#seasontags, #liturgytags, #sacramenttags, #saintsSolemnitiesFeastDaysTags" ). onChange ( function  () { 
    search (); 
}); 

function  search () { 

    let  filter  =  wixData . filter (); 

    let  seasIdx  =  $w ( "#seasontags" ). selectedIndices ; 
    let  litIdx  =  $w ( "#liturgytags" ). selectedIndices ; 
    let  sacIdx  =  $w ( "#sacramenttags" ). selectedIndices ; 
    let  sainIdx  =  $w ( "#saintsSolemnitiesFeastDaysTags" ). selectedIndices ; 

    let  category  =  $w ( "#seasontags" ). value ; 
    let  litVal  =  $w ( "#liturgytags" ). value ; 
    let  sacVal  =  $w ( "#sacramenttags" ). value ; 
    let  sainVal  =  $w ( "#saintsSolemnitiesFeastDaysTags" ). value ; 

    if  ( seasIdx . length  >  0  ||  litIdx . length  >  0  ||  sacIdx . length  >  0  ||  sainIdx . length  >  0 ) { 

        filter  =  filter . hasSome ( "season" ,  category ) 
            . and ( filter  =  filter . hasSome ( "liturgy" ,  litVal )) 
            . and ( filter  =  filter . hasSome ( "sacrament" ,  sacVal )) 
            . and ( filter  =  filter . hasSome ( "saintsSolemnitiesFeastDays" ,  sainVal )) 
            

        $w ( "#dataset1" ). setFilter ( filter ) 
            . then ( count ) 

    }  **else**  { 
        $w ( "#dataset1" ). setFilter ( filter ) 
            . then ( count ) 
    } 

    $w ( "#resetfilter" ). onClick ( function  () { 
        $w ( "#seasontags, #liturgytags, #sacramenttags, #saintsSolemnitiesFeastDaystags" ). value  =  **undefined** ; 
        $w ( "#dataset1" ). setFilter ( wixData . filter ()). then ( count ); 
    }); 

} 

//COUNT ITEM 
function  count () { 
    let  count  =  $w ( "#dataset1" ). getTotalCount (); 
    if  ( count  >  0 ) { 
        $w ( "#countText" ). text  =  ` ${ count }  items found` ; 
    }  **else**  {  $w ( "#countText" ). text  =  `No item found` ; } 

    **return**  count ; 
} 

$w ( "#dataset1" ). onReady ( function  () { 
    count (); 
}); 

});

If you say the issue is still there when you completely remove the code, so it is not code issue and I can’t say for sure (only someone with access to your editor i.e. wix personel can).

Thanks for giving it a go.
I’ll follow that up with wix.
Peace.