File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -350,6 +350,24 @@ describe("assembled Select", () => {
350350 expect ( noOptions ?. textContent ) . toBe ( "Nothing for \"zzzz\"" ) ;
351351 } ) ;
352352
353+ it ( "removes a selected value when clicking a tag remove button in searchable multi mode" , async ( ) => {
354+ const { wrapper, model } = mountAssembledSelect ( {
355+ options,
356+ multiple : true ,
357+ searchable : true ,
358+ modelValue : [ "FR" , "GB" ] ,
359+ } ) ;
360+
361+ await wrapper . vm . $nextTick ( ) ;
362+
363+ expect ( wrapper . findAll ( "[data-select-tag]" ) ) . toHaveLength ( 2 ) ;
364+
365+ await wrapper . get ( "[data-select-tag-remove]" ) . trigger ( "click" ) ;
366+
367+ expect ( model . value ) . toEqual ( [ "GB" ] ) ;
368+ expect ( wrapper . findAll ( "[data-select-tag]" ) ) . toHaveLength ( 1 ) ;
369+ } ) ;
370+
353371 it ( "renders a custom tag remove icon from the tag-remove slot" , ( ) => {
354372 const { wrapper } = mountAssembledSelect ( {
355373 options,
Original file line number Diff line number Diff line change 293293}
294294
295295[data-assembled-select ] [data-select-tag ] {
296+ position : relative;
297+ z-index : 2 ;
296298 display : inline-flex;
297299 align-items : center;
298300 min-width : 0 ;
299301 margin : var ( --vs-multi-value-margin ) ;
302+ pointer-events : auto;
300303 padding : var ( --vs-multi-value-label-padding ) ;
301304 border : var ( --vs-multi-value-border ) ;
302305 border-radius : var ( --vs-multi-value-border-radius ) ;
You canβt perform that action at this time.
0 commit comments