Select only 1 selection tag for gallery

So I found this webpage (on bizimuhit) about filtering a dataset based on selection tags - and I copied and pasted the code into my website and it works great! The code looks like this:

import wixData from ‘wix-data’ ;

$w . onReady ( function (){

$w ( ‘#selectionTags1’ ). onChange (()=>{

const selectedTag = $w ( ‘#selectionTags1’ ). value ;
let filter = wixData . filter ();

if ( selectedTag . length > 0 ){

filter = filter . hasSome ( “page” , selectedTag );

}

$w ( ‘#dataset6’ ). setFilter ( filter );

})

}); 

Is there a way to amend this code to ensure that only 1 tag can be selected at a time, rather than having to unclick each one every time?

I’m very unfamiliar with code, so basic help would be appreciated.

Take a look here → https://www.media-junkie.com/one-way-selection-tags