File tree Expand file tree Collapse file tree 2 files changed +22
-16
lines changed
packages/vuetify/src/components Expand file tree Collapse file tree 2 files changed +22
-16
lines changed Original file line number Diff line number Diff line change @@ -278,14 +278,7 @@ export const VField = genericComponent<new <T>(
278
278
/>
279
279
280
280
{ hasPrepend && (
281
- < div
282
- key = "prepend"
283
- class = "v-field__prepend-inner"
284
- onMousedown = { ( e : MouseEvent ) => {
285
- e . preventDefault ( )
286
- e . stopPropagation ( )
287
- } }
288
- >
281
+ < div key = "prepend" class = "v-field__prepend-inner" >
289
282
{ props . prependInnerIcon && (
290
283
< InputIcon
291
284
key = "prepend-icon"
@@ -377,14 +370,7 @@ export const VField = genericComponent<new <T>(
377
370
) }
378
371
379
372
{ hasAppend && (
380
- < div
381
- key = "append"
382
- class = "v-field__append-inner"
383
- onMousedown = { ( e : MouseEvent ) => {
384
- e . preventDefault ( )
385
- e . stopPropagation ( )
386
- } }
387
- >
373
+ < div key = "append" class = "v-field__append-inner" >
388
374
{ slots [ 'append-inner' ] ?.( slotProps . value ) }
389
375
390
376
{ props . appendInnerIcon && (
Original file line number Diff line number Diff line change @@ -46,6 +46,26 @@ const stories = Object.fromEntries(Object.entries({
46
46
) ] ) )
47
47
48
48
describe ( 'VSelect' , ( ) => {
49
+ it ( 'should toggle menu with dropdown icon' , async ( ) => {
50
+ const { element } = render ( ( ) => (
51
+ < VSelect items = { [ 'Item #1' , 'Item #2' ] } />
52
+ ) )
53
+
54
+ const menuIcon = screen . getByCSS ( '.v-icon' )
55
+ expect ( screen . queryAllByCSS ( '.v-list-item' ) ) . toHaveLength ( 0 )
56
+ expect ( element ) . not . toHaveClass ( 'v-select--active-menu' )
57
+
58
+ await userEvent . click ( menuIcon )
59
+ await commands . waitStable ( '.v-list' )
60
+ expect ( screen . queryAllByCSS ( '.v-list-item' ) ) . toHaveLength ( 2 )
61
+ expect ( element ) . toHaveClass ( 'v-select--active-menu' )
62
+
63
+ await userEvent . click ( menuIcon )
64
+ await commands . waitStable ( '.v-list' )
65
+ expect ( screen . queryAllByCSS ( '.v-list-item' ) ) . toHaveLength ( 0 )
66
+ expect ( element ) . not . toHaveClass ( 'v-select--active-menu' )
67
+ } )
68
+
49
69
it ( 'should render selection slot' , ( ) => {
50
70
const items = [
51
71
{ title : 'a' } ,
You can’t perform that action at this time.
0 commit comments