Skip to content

Commit 8b2fae3

Browse files
committed
fix(VCalendar): use camelCase event names
fixes #22063
1 parent 263ca4b commit 8b2fae3

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

packages/api-generator/src/locale/en/VCalendar.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,12 @@
6565
},
6666
"events": {
6767
"[`${string}:date`]": "Any event on the day of the month link. The second argument is the day & time object.",
68-
"[`${string}:day-category`]": "Any event on a day in the `category` view. The second argument is the day object.",
68+
"[`${string}:dayCategory`]": "Any event on a day in the `category` view. The second argument is the day object.",
6969
"[`${string}:day`]": "Any event on a day. The second argument is the day object.",
7070
"[`${string}:event`]": "Any event on a specific event. The second argument is the day & time object.",
7171
"[`${string}:interval`]": "Any event at a specific interval label in the `day` view. The second argument is the day & time object.",
7272
"[`${string}:more`]": "Any event on the `X more` button on views with too many events in a day. The second argument is the day & time object.",
73-
"[`${string}:time-category`]": "Any event at a specific time in the `category` view. The second argument is the day & time object.",
73+
"[`${string}:timeCategory`]": "Any event at a specific time in the `category` view. The second argument is the day & time object.",
7474
"[`${string}:time`]": "Any event at a specific time in the `day` view. The second argument is the day & time object.",
7575
"change": "The range of days displayed on the calendar changed. This is triggered on initialization. The event passed is an object with start and end date objects.",
7676
"moved": "One of the functions `next`, `prev`, and `move` was called. The event passed is the day object calculated for the movement."

packages/vuetify/src/components/VDataTable/VDataTableRows.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ export const VDataTableRows = genericComponent<new <T>(
123123
<VDataTableGroupHeaderRow
124124
key={ `group-header_${item.id}` }
125125
item={ item }
126-
{ ...getPrefixedEventHandlers(attrs, ':group-header', () => slotProps) }
126+
{ ...getPrefixedEventHandlers(attrs, ':groupHeader', () => slotProps) }
127127
{ ...groupHeaderRowProps }
128128
v-slots={ slots }
129129
/>

packages/vuetify/src/labs/VCalendar/VCalendar.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,12 @@ interface CalendarDayCategorySlotScope extends CalendarDayBodySlotScope {
8888
export const VCalendar = genericComponent<new (
8989
props: {
9090
[key: `on${Capitalize<string>}:date`]: EventProp<[Event, CalendarTimestamp]>
91-
[key: `on${Capitalize<string>}:day-category`]: EventProp<[Event, CalendarDayCategorySlotScope]>
91+
[key: `on${Capitalize<string>}:dayCategory`]: EventProp<[Event, CalendarDayCategorySlotScope]>
9292
[key: `on${Capitalize<string>}:day`]: EventProp<[Event, CalendarDayBodySlotScope]>
9393
[key: `on${Capitalize<string>}:event`]: EventProp<[Event, EventSlotScope]>
9494
[key: `on${Capitalize<string>}:interval`]: EventProp<[Event, CalendarTimestamp]>
9595
[key: `on${Capitalize<string>}:more`]: EventProp<[Event, CalendarDaySlotScope]>
96-
[key: `on${Capitalize<string>}:time-category`]: EventProp<[Event, CalendarDayCategorySlotScope]>
96+
[key: `on${Capitalize<string>}:timeCategory`]: EventProp<[Event, CalendarDayCategorySlotScope]>
9797
[key: `on${Capitalize<string>}:time`]: EventProp<[Event, CalendarDayBodySlotScope]>
9898
},
9999
slots: {

packages/vuetify/src/labs/VCalendar/VCalendarCategory.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export const VCalendarCategory = defineComponent({
6060

6161
function genDayHeaderCategory (day: CalendarTimestamp, scope: any) {
6262
const headerTitle = typeof scope.category === 'object' ? scope.category.categoryName : scope.category
63-
const events = getPrefixedEventHandlers(attrs, ':day-category', () => {
63+
const events = getPrefixedEventHandlers(attrs, ':dayCategory', () => {
6464
return getCategoryScope(base.getSlotScope(day) || day, scope.category)
6565
})
6666
return (
@@ -139,7 +139,7 @@ export const VCalendarCategory = defineComponent({
139139
}
140140

141141
function genDayBodyCategory (day: CalendarTimestamp, category: CalendarCategory) {
142-
const events = getPrefixedEventHandlers(attrs, ':time-category', e => {
142+
const events = getPrefixedEventHandlers(attrs, ':timeCategory', e => {
143143
return getCategoryScope(
144144
base.getSlotScope(base.getTimestampAtEvent(e, day)),
145145
category

0 commit comments

Comments
 (0)