Description
Previous migration guide: v7.0.0 Migration Guide.
.NET 7 is no longer supported
For .NET 7 support, stay on the latest v7.x.x version. For bug fixes in v7, please PR and we'll release updates.
More details: #9511
Dialog
Caution
Change MudDialogInstance
to IMudDialogInstance
.
DialogOptions
is now an immutable record. Use SetOptionsAsync
and with
to modify DialogOptions
:
[CascadingParameter]
private IMudDialogInstance MudDialog { get; set; }
private Task ToggleFullscreenAsync()
{
var options = MudDialog.Options with
{
FullScreen = !(MudDialog.Options.FullScreen ?? false)
};
return MudDialog.SetOptionsAsync(options);
}
More details: #10066
KeyInterceptor
IKeyInterceptor
/ KeyInterceptor
, IKeyInterceptorFactory
/ KeyInterceptorFactory
were removed and replaced with KeyInterceptorService
. More details: #9896
KeyOptions
is now immutable. More details: #9969
MudPopoverService
Removed from the core, replaced by PopoverService
. The MudPopoverService
was legacy, provided only for cases where you might encounter issues with PopoverService
. If you encounter issues, please submit an issue.
More details: #9957
DialogService
- Removed
OnDialogInstanceAdded
, useDialogInstanceAddedAsync
instead. #9980
Converters
In Converter.cs, several property signatures have been updated to enhance localization support. These properties no longer return English messages directly. Instead, they now return keys intended for localization, accompanied by additional parameters:
- OnError: Updated from
Action<string>?
toAction<string, object[]>?
. This allows passing a key and optional parameters, enabling more flexible and accurate localization. - SetErrorMessage and GetErrorMessage: Both changed from
string?
to(string, object[])?
. These properties now provide a key for localization along with relevant parameters, shifting message formatting to the localization system.
EventUtil
The following API has been removed:
EventUtil.AsNonRenderingEventHandler(...)
It has been replaced with:
this.AsNonRenderingEventHandler(...)
Because this is now an extension method that requires a reference to ComponentBase
. The previous EventUtil.AsNonRenderingEventHandler
did not propagate exceptions to ErrorBoundary
(see dotnet/aspnetcore#54543). The new method ensures that exceptions are properly handled and propagated.
More details: #9967
Charts
TimeSeriesDiplayType
was renamed toTimeSeriesDisplayType
.EndSlopeSpline
,ILineInterpolator
,Matrix
,MatrixSolver
,NaturalSpline
,PeriodicSpline
,SplineInterpolator
,SvgCircle
,SvgPath
,SvgText
are now internal.TimeSeriesChartSeries
,TimeSeriesDisplayType
moved toMudBlazor
namespace for consistency.
More details: #9919
DataGrid
CellActions:
The following properties are now "required":
- SetSelectedItemAsync
- StartEditingItemAsync
- CancelEditingItemAsync
- ToggleHierarchyVisibilityForItemAsync
Column:
- Removed
Action ColumnStateHasChanged
MudDataGrid:
_classname
renamed toClassname
_style
renamed toStylename
_tableStyle
renamed toTableStyle
_tableClass
renamed toTableClass
_headClassname
renamed toHeadClassname
_footClassname
renamed toFootClassname
_headerFooterStyle
renamed toHeaderFooterStyle
- Removed
CancelledEditingItem
, replace withCanceledEditingItem
. #9982
More details: #10149
MudTheme
BaseTypography
is now an abstract class! If you usednew BaseTypography()
please replace it with corresponding implementation. #9434- Class
Default
was renamed toDefaultTypography
to a allow source generation STJ usage. #9434 - Class
H1
was renamed toH1Typography
. #9962 - Class
H2
was renamed toH2Typography
. #9962 - Class
H3
was renamed toH3Typography
. #9962 - Class
H4
was renamed toH4Typography
. #9962 - Class
H5
was renamed toH5Typography
. #9962 - Class
H6
was renamed toH6Typography
. #9962 - Class
Subtitle1
was renamed toSubtitle1Typography
. #9962 - Class
Subtitle2
was renamed toSubtitle2Typography
. #9962 - Class
Body1
was renamed toBody1Typography
. #9962 - Class
Body2
was renamed toBody2Typography
. #9962 - Class
Input
and the property was removed, use subtitle1. #10028 - Class
Button
was renamed toButtonTypography
. #9962 - Class
Caption
was renamed toCaptionTypography
. #9962 - Class
Overline
was renamed toOverlineTypography
. #9962 - In
Typography
theFontWeight
andLineHeight
are now anstring
type instead ofint
. #9011
DropZone
- MudDropContainer: Removed
GetTransactionOrignZoneIdentiifer
, replace withGetTransactionOriginZoneIdentifier
. #9981 - MudDropContainer: Removed
GetTransactionOrignZoneIdentifier
, replace withGetTransactionOriginZoneIdentifier
. #9981 - MudDropContainer: Removed
GetTransactionCurrentZoneIdentiifer
, replace withGetTransactionCurrentZoneIdentifier
. #9981 - MudDropContainer: Removed
IsOrign
, replace withIsOrigin
. #9981
Inputs
Typo.input
was removed. UseTypo.subtitle1
instead. #10028- Accordingly all
input
typo CSS was removed. Use--mud-typography-subtitle1
instead. #10028 - Note: This changes the order of the
Typo
enum to where it was before v7. #10028 MudInputAdornment.Edge
was replaced withMudInputAdornment.Placement
. #10057- Popover menus now originate from under the field by default. #10071
Autocomplete
- No longer wraps around to the top item when using arrow keys in order to align with similar components. #10161
- The public
ScrollToListItemAsync
method was removed. #10161 - When
Immediate
is enabled, the value is now coerced immediately. #10138
MudColor
- Renamed
HslChanged
toHslEquals
, and the result is now not reverted. #10355 Equals
now checks bothRGBA
andHSL
values. Previously, it only checkedRGBA
. #10355
MudMenu
- Menus can now be directly nested without additional setup. Nested menus inside another MudMenu will now be rendered as a MudMenuItem instead of MudButton. #10452, #10469
- The popover now originates from under the activator by default. #10071
IconSize
was removed in order to align with Material Design. #10478 #10542
MudChip
The MudChip now renders a semantic anchor tag in place if the div if an href is specified. It can now be a true anchor and so no longer acts like a button. The browser now handles the click (and Enter key) so OnClick is disabled and the close button is no longer shown (if applicable). This improves accessibility, including allowing the user to hover it to see the link it will direct them to, middle click to open in a new tab, or drag to another place.
Localization
In DefaultLocalizationInterceptor
we removed:
LocalizedString TranslationFallback(string key)
use instead:
LocalizedString TranslationWithFallback(string key, params object[] arguments)
Note: Legacy keys were removed:
Old Key | New Key |
---|---|
MudDataGrid.= | MudDataGrid_EqualSign |
MudDataGrid.!= | MudDataGrid_NotEqualSign |
MudDataGrid.> | MudDataGrid_GreaterThanSign |
MudDataGrid.>= | MudDataGrid_GreaterThanOrEqualSign |
MudDataGrid.< | MudDataGrid_LessThanSign |
MudDataGrid.<= | MudDataGrid_LessThanOrEqualSign |
MudDataGrid.RefreshData | MudDataGrid_RefreshData |
MudDataGrid.is not | MudDataGrid_IsNot |
MudDataGrid.is not empty | MudDataGrid_IsNotEmpty |
MudDataGrid.Sort | MudDataGrid_Sort |
MudDataGrid.Save | MudDataGrid_Save |
MudDataGrid.True | MudDataGrid_True |
MudDataGrid.False | MudDataGrid_False |
MudDataGrid.Hide | MudDataGrid_Hide |
MudDataGrid.HideAll | MudDataGrid_HideAll |
MudDataGrid.starts with | MudDataGrid_StartsWith |
MudDataGrid.equals | MudDataGrid_Equals |
MudDataGrid.not equals | MudDataGrid_NotEquals |
MudDataGrid.Unsort | MudDataGrid_Unsort |
MudDataGrid.Columns | MudDataGrid_Columns |
MudDataGrid.Loading | MudDataGrid_Loading |
MudDataGrid.MoveUp | MudDataGrid_MoveUp |
MudDataGrid.MoveDown | MudDataGrid_MoveDown |
MudDataGrid.is | MudDataGrid_Is |
MudDataGrid.is before | MudDataGrid_IsBefore |
MudDataGrid.is on or before | MudDataGrid_IsOnOrBefore |
MudDataGrid.is on or after | MudDataGrid_IsOnOrAfter |
MudDataGrid.Filter | MudDataGrid_Filter |
MudDataGrid.contains | MudDataGrid_Contains |
MudDataGrid.Value | MudDataGrid_Value |
MudDataGrid.Group | MudDataGrid_Group |
MudDataGrid.Apply | MudDataGrid_Apply |
MudDataGrid.Clear | MudDataGrid_Clear |
MudDataGrid.ShowAll | MudDataGrid_ShowAll |
MudDataGrid.Column | MudDataGrid_Column |
MudDataGrid.Cancel | MudDataGrid_Cancel |
MudDataGrid.FilterValue | MudDataGrid_FilterValue |
MudDataGrid.Operator | MudDataGrid_Operator |
MudDataGrid.is empty | MudDataGrid_IsEmpty |
MudDataGrid.is after | MudDataGrid_IsAfter |
MudDataGrid.Ungroup | MudDataGrid_Ungroup |
MudDataGrid.not contains | MudDataGrid_NotContains |
MudDataGrid.ends with | MudDataGrid_EndsWith |
MudDataGrid.CollapseAllGroups | MudDataGrid_CollapseAllGroups |
MudDataGrid.AddFilter | MudDataGrid_AddFilter |
MudDataGrid.ExpandAllGroups | MudDataGrid_ExpandAllGroups |
More details: #10001
Other Changes
- MudTable:
EditButtonContext
namespace changed fromMudBlazorFix
toMudBlazor
. #9952 - MudCollapse: Reworked to use a grid instead of JavaScript for height calculation. Animation is now a static 300 ms. #10056
- MudSelectItem:
Ripple
,Href
,ForceLoad
, andOnClick
parameters removed. They were never implemented. #10045 - MudBaseSelectItem: Removed base class. Copy-paste its code if you inherited this class. #10045
- MudFormComponent:
Dispose(bool disposing)
replaced withprotected virtual ValueTask DisposeAsyncCore()
. This affects all components inheriting this base class. #10037 - ResizeObserver: Now internal and doesn't implement
IDisposable
. InjectIResizeObserver
/IResizeObserverFactory
via DI to use its API. #10055 - EventListener: Now internal and doesn't implement
IDisposable
. InjectIEventListener
/IEventListenerFactory
via DI to use its API. #10051 - JsApiService: Now internal. Inject
IJsApiService
via DI to use its API. #9994 - JsEvent: Now internal and doesn't implement
IDisposable
. InjectIJsEvent
/IJsEventFactory
via DI to use its API. #9996 #10061 - ScrollListener: Now internal. Inject
IScrollListener
/IScrollListenerFactory
via DI to use its API. #10048 - ScrollSpy: Now internal. Inject
IScrollSpy
/IScrollSpyFactory
via DI to use its API. #10048 - ScrollManager: Now internal. Inject
IScrollManager
via DI to use its API. #10048 - ScrollManagerException: Removed, not used in the core. #10048
- ScrollOptions: Removed, not used in the core. #10048
- Renamed
IIJSRuntimeExtentions
toIJSRuntimeExtensions
. #9997 - Renamed
SortingAssistent
toSortingAssistant
. #9952 - Removed
EnableIllegalRazorParameterDetection
fromMudGlobal
. #9580 - MudCheckBox: Renamed
HandleKeyDown
toHandleKeyDownAsync
. #9921 - MudNumericField: Renamed
HandleKeydown
toHandleKeyDownAsync
,HandleKeyUp
toHandleKeyUpAsync
,OnMouseWheel
toOnMouseWheelAsync
. #9921 - MudSwitch: Renamed
HandleKeyDown
toHandleKeyDownAsync
. #9921 - MudFileUpload: Now generates a new
input
with every file change to retain references to previous files. It is no longer possible to supply your ownid
to the underlyinginput
. More details: #9600 - MudRadio, MudCheckBox, MudSwitch:
LabelPosition
andPlacement
replaced byLabelPlacement
of typePlacement
(enum).Checked
property replaced byT Value
. #9472 - MudSwitch:
SwitchLabelClassname
was renamed toLabelClassName
. #9472 - MudDrawer: The variant
Temporary
/Persistent
has been changed to behave non-responsively, meaning solely controlled by theOpen
parameter. #10095 - MudBreadcrumbs: BreadcrumbItem is now a record and any class that inherits from it must be updated to a record as well. #10116
- MudBreadcrumbs: The
ul
element is now anol
wrapped in anav
in order to improve accessibility semantics. #10115 - MudToggleItem: The span containing the checkmark icon was removed and the icon is now a direct child of mud-button-label. Checkmark classes that were on the span have been moved to the icon as well.
- MudSelect: The dropdown is now opened on
pointerdown
instead ofclick
to match the behavior of similar components. #10129 - MudListItem: Parameter
Gutters
was made nullable. #10199 - MudNumericField: Changed default
InputMode
toInputMode.decimal
. #9923 - MudPopover:
RelativeWidth
is now nullablebool?
. #10238 - MudSwipeArea: Now uses
onpointer*
instead ofontouch*
. Now supports swipes with mouse as well. #9445 - SnackbarOptions: The delegate invoked on Snackbar click has been renamed from
Onclick
toOnClick
. #8589 - MudSelect: Changed the visibility of
_currentIcon
from public to internal. #10451 - MudOverlay: Moved to SectionOutlet with
MudPopoverProvider
in all cases except dialogs, absolute positioned overlays, and overlays with child content. Should have minimal impact unless you have previously used a workaround for overlay positioning. Unit tests now always need a popover provider if they want to interact/check if the mud-overlay exists,
i.e.var providerComp = Context.RenderComponent<MudPopoverProvider>();
#10446 - MudOverlay: Now positioned statically and re positioned for nested popovers. to avoid this behavior set
Absolute="true"
. #10446 - MudToggleGroup: Removed
Rounded
in favor of our CSS utility classes, i.e.rounded-pill
. #10533