Breaking Changes in 8.0.0
The Kendo UI for Vue 8.0.0 release removes the default values of the appearance properties (size, rounded, fillMode, themeColor, and the related ones) of many components, narrows the types of these properties, removes the shape property of the buttons, and changes the Grid loader, the Grid row properties, and the Grid template ref. Stale values are not always reported at runtime, and TypeScript flags them only where the type was narrowed, so review your code rather than rely on compilation errors.
The components no longer render the classes that the removed defaults produced, unless you set the properties explicitly. To keep the previous look, set the properties explicitly, for example size="medium", rounded="medium", fillMode="solid", and themeColor="base", where the component supported them. For the removed and renamed classes, see Rendering Changes in 8.0.0.
For most of the properties below, the types become strict unions. They no longer accept null and arbitrary strings, and 'none' is a valid rounded value. The sections below list the exceptions. Omitting a property is equivalent to the previous null, so use undefined or omit the property instead of passing null.
Buttons
-
Button,Chip,ChipList,DropDownButton,FloatingActionButton,SplitButton,SpeechToTextButton, andToolbar—Thesize,rounded,fillMode, andthemeColorproperties no longer have default values. TheiconSizeproperty of theButtonand theSpeechToTextButtonhas no default value either.- Before:
<Button />rendered the classes of the'medium'size, the'medium'rounded corners, the'solid'fill mode, and the'base'theme color. The same applied to the other components with their own defaults. - After: A class is rendered only for the properties that you set. The
ChipListhas no defaults forsize,rounded, andfillMode, and theToolbarhas no defaults forsizeandfillMode. Neither of them has athemeColorproperty. TheChipListno longer passes default values to its chips. - To migrate, set
size,rounded,fillMode, andthemeColorexplicitly wherever you need the previous appearance, replacenullwithundefinedor omit the property, and update the CSS and tests that depend on the removed classes. Thebuttons-appearance-null-propscodemod removes the literalnullvalues automatically. Review the values that evaluate tonullat runtime, such as:size="compact ? 'small' : null", the properties passed throughv-bind="obj"or JSX spreads, and the wrapper components that forward these properties, together with the types of those wrappers.
- Before:
-
Button,DropDownButton,FloatingActionButton, andSplitButton—Theshapeproperty is removed, and theFloatingActionButtonShapetype is no longer exported.- Before:
<Button shape="square" />,<FloatingActionButton :shape="'pill'" />, or<DropDownButton shape="rectangle" />rendered thek-button-<shape>class (except for'rectangle') or thek-fab-<shape>class. TheFloatingActionButtonrenderedk-fab-rectangleby default and supported'square','pill','circle', and'rounded'. - After: The property does not exist, and the
k-button-<shape>andk-fab-<shape>classes are not rendered. - To migrate, remove the
shapeproperty and theFloatingActionButtonShapetype, and use theroundedproperty for the corner shape:'none'for a rectangle or square look,'medium'for the default rounded corners, and'full'for a pill or circle look. There is no one-to-one replacement. Update the custom CSS, tests, and wrapper components that depend on the removed classes or on the type. Thebutton-shape-removedcodemod flags the affected files.
- Before:
Data Tools
-
PagerandFilterCell—Thesizeproperty of thePagerno longer has a default value ('medium'). ThePagerpasses itssizeto the navigation buttons, the numeric buttons, the responsive page select, and the page sizeDropDownList, and theFilterCellpasses itssizeto its child controls. These controls no longer receive a default size, and the default appearance classes of the buttons and dropdowns are not rendered either.- Before:
<Pager :size="null" />rendered no size classes, while an omittedsizerendered the defaultk-pager-mdclass. TheFilterCellsizetype acceptednulland arbitrary strings. - After: The
sizetype of thePagerand theFilterCellno longer accepts arbitrary strings, and theFilterCellno longer acceptsnull. - To migrate, set
size="medium"explicitly where you need the previous appearance, replacenullwithundefinedor omit the property, and update the CSS and tests that depend on the removed classes. Thedatatools-appearance-null-propscodemod removes the literalnullvalues of thePagersizeautomatically.
- Before:
Date Inputs
-
DateInput,DatePicker,DateRangePicker,DateTimePicker, andTimePicker—Thesize,rounded, andfillModeproperties no longer have default values ('medium','medium', and'solid').- Before: The components rendered
k-input-md k-input-solid k-rounded-mdwhen the properties were not set. The swap button of theDateRangePickerrenderedk-button-mdandk-rounded-md. - After: The classes are not rendered unless you set the properties. The
roundedvalidator now also accepts'none', and thesizetype ofDateInputSettings,DatePickerSettings,DateRangePickerSettings,DateTimePickerSettings, andTimePickerSettingsno longer accepts arbitrary strings. - To migrate, set
size="medium",rounded="medium", andfillMode="solid"explicitly where you need the previous appearance, replacenullwithundefinedor omit the properties, and update the CSS and tests that depend on the removed classes. Thedateinputs-appearance-null-propscodemod removes the literalnullvalues automatically. Review thesize,rounded, andfillModevalues that you set in the*Settingsobjects.
- Before: The components rendered
Dropdowns
-
AutoComplete,ComboBox,DropDownList,DropDownTree,MultiSelect, andMultiSelectTree—Thesize,rounded, andfillModeproperties no longer have default values ('medium','medium', and'solid'). ThetagsRoundedproperty of theMultiSelecthas no default value ('medium') either.- Before: The
AutoComplete,ComboBox,MultiSelect, andMultiSelectTreerenderedk-input-md k-rounded-md k-input-solid, and theDropDownListandDropDownTreerenderedk-picker-md k-rounded-md k-picker-solid. - After: The classes are not rendered unless you set the properties. The properties are strict unions, and
'none'is a validroundedandtagsRoundedvalue. The tags of theMultiSelectand theMultiSelectTreeareChipcomponents, which no longer apply their own default fill mode and theme color either. - To migrate, set
size="medium",rounded="medium", andfillMode="solid"explicitly where you need the previous appearance, replacenullwithundefinedor omit the properties, and update the CSS and tests that depend on the removed classes. Thedropdowns-appearance-null-propscodemod removes the literalnullvalues automatically.
- Before: The
Grid
-
Grid—The boolean form of theloaderproperty is removed. The newshowLoaderproperty controls whether the loader is displayed, andloaderaccepts only a custom loader template (a slot name, a render function, or a component).- Before:
<Grid :loader="isLoading" />displayed the default loader whileisLoadingwastrue, and<Grid :loader="'myLoader'" />displayed the custom loader whenever the property was set. - After:
<Grid :show-loader="isLoading" />displays the default loader, and<Grid :loader="'myLoader'" :show-loader="isLoading" />displays the custom loader whileshowLoaderistrue. A booleanloadervalue no longer shows the loader. - To migrate, rename the boolean
loadertoshowLoader(show-loaderin templates). For a custom loader template, keeploaderand addshowLoader, driven by the state that previously decided whether the loader was shown. If a value can be either a boolean or a template, split it into ashowLoaderboolean and aloadertemplate. Thegrid-loader-show-loadercodemod renames the literal boolean values (loader,:loader="true",:loader="false",loader={true}, andloader={false}) automatically. Thegrid-loader-bindingcodemod flags the dynamic bindings, such as:loader="isLoading"or:loader="isLoading && !error", the properties passed throughv-bind="obj"or JSX spreads, and the wrapper components that forwardloader, so that you migrate them manually.
- Before:
-
Grid—The row properties that the Grid passes to a custom row render changed.GridRowPropsandGridRowno longer declaredataItem. They declareitem, the row model of the Grid, which holds the data item initem.dataItemtogether with the row type, level, expanded state, and index.- Before:
rowRender: (h, trElement, defaultSlots, props) => ... props.dataItem.ProductNameandprops: GridRowPropswithprops.dataItem. - After: The same code reads
props.item.dataItem.ProductName. The cell properties (GridCellProps) still usedataItem. At runtime, the Grid still addsdataItem(the value ofitem.dataItem) to the properties of a customrowRender, but it is no longer part of the typedGridRowProps. TheselectedFieldproperty is no longer passed to the row. UseisSelectedinstead. - To migrate, read the data item from
props.item.dataItemin everyrowRender(row-renderin templates) function, component, and slot that usesGridRowProps, and update the wrapper components and their TypeScript types. Thegrid-row-render-itemcodemod flags the affected files.
- Before:
-
Grid—The template ref of the Grid exposes only the members ofGridHandle:element,props,columns,scrollIntoView,fitColumns, andexportAsPdf, plus the standard Vue instance properties such as$eland$props. The Grid is now a wrapper around an inner component.- Before:
gridRef.value.getColumns()returned the current columns with their widths and any otherGridColumnProps. The other methods and data of the Grid instance were reachable through the ref. - After:
gridRef.value.getColumnsisundefined, and the other methods and data of the previous Grid instance are no longer reachable through the ref. The replacement ofgetColumns()is thecolumnsproperty (gridRef.value.columns), which is a property, not a function. - To migrate, replace the
getColumns()calls with thecolumnsproperty, and check every other member that your code reads from the Grid ref against the list above. Thegrid-ref-get-columnscodemod rewrites the zero-argumentgetColumns()calls automatically when the ref is statically a Grid ref in the same file: a staticref="grid"on theGrid, a JSXref,useTemplateRef,ref<InstanceType<typeof Grid>>(), orthis.$refs.grid. Migrate manually the template expressions such as@click="gridRef.getColumns()", the aliased or dynamic refs, and the calls on refs that cannot be proven to be Grid refs. Thegrid-ref-apicodemod flags the files with the remaininggetColumns()calls.
- Before:
-
GridToolbar—Thesizeproperty no longer has a default value, and it now also accepts'none'. The defaultsizeof theGriditself ('medium') is not removed, and theGridFilterCellnever applied a default size.- Before:
<GridToolbar />rendered thek-toolbar-mdclass. - After:
<GridToolbar />does not renderk-toolbar-md. - To migrate, set
size="medium"explicitly to keep the previous appearance, and update the CSS and tests that depend on the removed class.
- Before:
Indicators
-
Badge—Thesize,rounded,fillMode, andthemeColorproperties no longer have default values, and the types no longer acceptnulland arbitrary strings.- Before:
<Badge />renderedk-badge-md k-badge-solid k-badge-solid-primary k-rounded-md. - After: The classes are not rendered unless you set the properties. When
themeColoris set, theBadgerenders a singlek-badge-<themeColor>class instead of the combinedk-badge-<fillMode>-<themeColor>class. - To migrate, set
size="medium",rounded="medium",fillMode="solid", andthemeColor="primary"explicitly where you need the previous appearance, replacenullwithundefinedor omit the properties, and update the CSS and tests that depend on the removed or renamed classes. Theindicators-appearance-null-propscodemod removes the literalnullvalues automatically.
- Before:
-
BadgeContainer—Thesize,rounded, andfillModeproperties no longer have default values. ThethemeColordefault ('primary') is not removed.- Before: The badge element of the
BadgeContainerrenderedk-badge-md k-badge-solid k-badge-solid-primary k-rounded-md. - After: The combined
k-badge-<fillMode>-<themeColor>class is rendered only whenfillModeis set. OmittingthemeColorstill renders the primary color, sothemeColor={null}is left unchanged by the codemod. - To migrate, set
size="medium",rounded="medium", andfillMode="solid"explicitly where you need the previous appearance, and update the CSS and tests that depend on the removed classes.
- Before: The badge element of the
-
Loader—Thesizeproperty no longer has a default value. ThethemeColordefault ('primary') is not removed.- Before:
<Loader />renderedk-loader-md. - After:
<Loader />does not renderk-loader-md, and still rendersk-loader-primary. - To migrate, set
size="medium"explicitly to keep the previous appearance, and update the CSS and tests that depend on the removed class.
- Before:
Inputs
-
Checkbox,ColorPalette,ColorPicker,FlatColorPicker,Input,MaskedTextBox,NumericTextBox,RadioButton,Signature,Switch,TextArea, andTextBox—The default values of thesize,rounded,fillMode,trackRounded, andthumbRoundedproperties that each component supports are removed. TheCheckboxsupportssizeandrounded. TheColorPalette,FlatColorPicker, andRadioButtonsupportsize. TheColorPicker,Input,MaskedTextBox,NumericTextBox,Signature,TextArea, andTextBoxsupportsize,rounded, andfillMode. TheSwitchsupportssize,trackRounded, andthumbRounded.- Before: The
Input,TextBox,TextArea,MaskedTextBox, andNumericTextBoxrenderedk-input-md k-rounded-md k-input-solid, theCheckboxrenderedk-checkbox-md k-rounded-md, theRadioButtonrenderedk-radio-md, and theSwitchrenderedk-switch-mdandk-rounded-full. - After: The classes are not rendered unless you set the properties. The properties are strict unions, and
'none'is a validrounded,trackRounded, andthumbRoundedvalue. TheColorGradientnever had a default size, but it no longer receives one from theFlatColorPickerand theColorPickerpopup. - To migrate, set
size="medium",rounded="medium", andfillMode="solid"explicitly where you need the previous appearance, replacenullwithundefinedor omit the properties, and update the CSS and tests that depend on the removed classes. Theinputs-appearance-null-propscodemod removes the literalnullvalues automatically.
- Before: The
-
Switch—The'circle'option is removed from thetrackRoundedandthumbRoundedtypes.- Before:
<Switch trackRounded="circle" thumbRounded="circle" />was part of the types. - After:
trackRoundedandthumbRoundedaccept'none','small','medium','large', and'full'. - To migrate, replace
'circle'with'full'for a fully rounded track or thumb. Theinputs-default-appearance-rendering-changescodemod flags theSwitchcomponents that settrackRoundedorthumbRoundedto'circle'as string literals. Review the values that come from variables or expressions manually.
- Before:
Layout
-
Avatar—Thesize,rounded, andfillModeproperties no longer have default values. ThethemeColordefault ('primary') is not removed.- Before:
<Avatar />renderedk-avatar-md k-rounded-md k-avatar-solid k-avatar-solid-primary. - After: The classes are not rendered unless you set the properties, and
k-avatar-solid-primaryis rendered only together withfillMode="solid". TheAvatarproperty types still acceptnull, andthemeColor={null}is left unchanged by the codemod. - To migrate, set
size="medium",rounded="medium", andfillMode="solid"explicitly where you need the previous appearance, replacenullwithundefinedor omit the properties, and update the CSS and tests that depend on the removed classes. Thelayout-appearance-null-propscodemod removes the literalnullvalues automatically.
- Before:
-
TabStrip—Thesizeproperty no longer has a default value.- Before:
<TabStrip />rendered thek-tabstrip-mdclass. - After:
<TabStrip />does not renderk-tabstrip-md. TheTabStripsizetype still acceptsnull. - To migrate, set
size="medium"explicitly to keep the previous appearance, and update the CSS and tests that depend on the removed class.
- Before:
-
Breadcrumb—Thesizeproperty no longer has a default value, and its type no longer acceptsnull. The markup is unchanged, because theBreadcrumbstill rendersk-breadcrumb-mdwhensizeis not set.- To migrate, replace
nullwithundefinedor omit the property.
- To migrate, replace
ListBox
-
ListBox—Thesizeproperty no longer has a default value ('medium'), and its type no longer acceptsnulland arbitrary strings. The type accepts only'small','medium', and'large'.- Before:
<ListBox />renderedk-list k-list-md. - After:
<ListBox />rendersk-list. - To migrate, set
size="medium"explicitly to keepk-list-md, replacenullwithundefinedor omit the property, and update the CSS and tests that depend on the removed class. Thelistbox-appearance-null-propscodemod removes the literalnullvalues automatically.
- Before:
TreeList
-
TreeList—Thesizeproperty no longer has a default value ('medium'), and it now also accepts'none'. The TreeList no longer passes a size to the header table, the filter row, and thePager, and theFilterCellandPagerchild controls no longer receive a default size.- Before:
<TreeList />renderedk-table-mdon the data table and the header table,k-toolbar-mdon the toolbar, andk-pager-mdon thePager. - After: The data table renders
k-grid-mdinstead ofk-table-md, and the header table, the toolbar, and thePagerhave no size class. The wrapper keepsk-grid-md, because it is applied whensizeis not set.'none'rendersk-grid-none,k-table-none, and the like. - To migrate, set
size="medium"explicitly to restore the previous classes, and update the CSS and tests that depend on the removed classes.
- Before:
For the changes in the generated markup and the CSS classes, see Rendering Changes in 8.0.0.