Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ef84a23

Browse filesBrowse files
committed
fix: CSelect: change input event to change, due to IE/edge support lack
1 parent 98f53db commit ef84a23
Copy full SHA for ef84a23

File tree

2 files changed

+4
-4
lines changed
Filter options

2 files changed

+4
-4
lines changed

‎src/components/form/CSelect.vue

Copy file name to clipboardExpand all lines: src/components/form/CSelect.vue
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
v-on="$listeners"
2020
:id="safeId"
2121
:class="inputClasses"
22-
@input="onSelect($event)"
22+
@change="onSelect($event)"
2323
>
2424
<option
2525
v-if="placeholder"

‎src/components/form/tests/CSelect.spec.js

Copy file name to clipboardExpand all lines: src/components/form/tests/CSelect.spec.js
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,17 +68,17 @@ describe(ComponentName, () => {
6868
it('emit update event', () => {
6969
const select = customWrapper.find('select')
7070
select.element.value = 'Option 2'
71-
select.trigger('input')
71+
select.trigger('change')
7272
expect(customWrapper.emitted()['update:value']).toBeTruthy()
7373
const select2 = customSimpleWrapper.find('select')
7474
select2.element.value = 'Option 3'
75-
select2.trigger('input')
75+
select2.trigger('change')
7676
expect(customSimpleWrapper.emitted()['update:value']).toBeTruthy()
7777
})
7878
it('not emit update event on multiple select', () => {
7979
const select = wrapperMultiple.find('select')
8080
select.element.value = 'Option 2'
81-
select.trigger('input')
81+
select.trigger('change')
8282
expect(wrapperMultiple.emitted()['update:value']).not.toBeTruthy()
8383
})
8484
})

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.