[Bug Report] VCalendar regression in click handler when dealing with string categories #12922
Labels
C: VCalendar
VCalendar
T: bug
Functionality that does not work as intended/expected
T: regression
Something that used to work but we broke
Milestone
Environment
Vuetify Version: 2.4.2
Last working version: 2.3.23
Vue Version: 2.6.12
Browsers: Edge 87.0.664.66
OS: Windows 10
Steps to reproduce
In v2.4, support for categories as objects was added. This seems to have introduced breaking changes to people who are using categories as an array of strings.
Specifically, I use the @mousedown:time-category event handler. This handler is passed an event with a category field. That field is now a category object always. The reproduction link above creates a simple calendar with 2 categories that are simple strings cat 1 and cat 2. The handler receives the event and dumps it to the console.
Note that when you click on the calendar, the event dumped to the console includes a category object with the name of the category in categoryName rather than category being a string as it used to be. This breaks all the code that used to process these events expecting the category to be a string.
Also, the docs have not been updated to reflect that category can be an object now and not just a string.
Expected Behavior
the object dumped to the console should have shown category: 'cat 1'
Actual Behavior
the object dumped to the console now shows category as an object:
{ categoryName: 'cat 1' }
Reproduction Link
https://codepen.io/gregveres-the-looper/pen/BaLVvjK?editors=1111
The text was updated successfully, but these errors were encountered: