Skip to content

Commit

Permalink
fix(types): rename emits event variables
Browse files Browse the repository at this point in the history
Vue automatically names the event key "event"
and causes duplicate variable conflicts
  • Loading branch information
johnleider committed Apr 10, 2023
1 parent 9655ec4 commit 0709890
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions packages/vuetify/src/components/VImg/VImg.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ export const VImg = genericComponent<VImgSlots>()({
},

emits: {
loadstart: (event: string | undefined) => true,
load: (event: string | undefined) => true,
error: (event: string | undefined) => true,
loadstart: (value: string | undefined) => true,
load: (value: string | undefined) => true,
error: (value: string | undefined) => true,
},

setup (props, { emit, slots }) {
Expand Down
2 changes: 1 addition & 1 deletion packages/vuetify/src/labs/VDataTable/VDataTableServer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export const VDataTableServer = genericComponent<VDataTableSlots>()({
'update:options': (options: any) => true,
'update:expanded': (options: any) => true,
'update:groupBy': (value: any) => true,
'click:row': (event: Event, value: { item: DataTableItem }) => true,
'click:row': (e: Event, value: { item: DataTableItem }) => true,
},

setup (props, { emit, slots }) {
Expand Down
2 changes: 1 addition & 1 deletion packages/vuetify/src/labs/VDataTable/VDataTableVirtual.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export const VDataTableVirtual = genericComponent<VDataTableVirtualSlots>()({
'update:options': (value: any) => true,
'update:groupBy': (value: any) => true,
'update:expanded': (value: any) => true,
'click:row': (event: Event, value: { item: DataTableItem }) => true,
'click:row': (e: Event, value: { item: DataTableItem }) => true,
},

setup (props, { emit, slots }) {
Expand Down

0 comments on commit 0709890

Please sign in to comment.