Skip to content

v1.6.0

Compare
Choose a tag to compare
@capdiem capdiem released this 02 Jul 07:09
· 124 commits to main since this release
e6b9750

⬆️ Upgrade guide

  • Change the script in _Host.cshtml or index.html.
    - <script src="_content/BlazorComponent/js/blazor-component.js"></script>
    + <script src="_content/Masa.Blazor/js/masa-blazor.js"></script>
  • Remove all references to BlazorComponent.
    - @using BlazorComponent
    - @using BlazorComponent.I18n
    - global using BlazorComponent;
    - global using BlazorComponent.I18n;
  • DragZone: The component was deprecated in v1.4.0 and has now been removed. It is recommended to use the MSortable component instead.

✨ Release notes

🚀 Features

  • DataTable: add support for custom the header selection slot. #1951
  • DatePicker: add support for click event for year, month and date. #1972
  • Divider: add the Length property to support custom line length. #1913
  • ECharts: add Loading parameter to control loading state. #1906
  • ExpansionPanel: add sub-component parameters, including Title and Text. #1954
    <!-- before -->
    <MExpansionPanel>
        <MExpansionPanelHeader>
            Item
        </MExpansionPanelHeader>
        <MExpansionPanelContent>
            Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
        </MExpansionPanelContent>
    </MExpansionPanel>
    
    <!-- now -->
    <MExpansionPanel Title="Item"
                   Text="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.">
    </MExpansionPanel>
  • Form: The context object provided by ChildContent now offers Validate, Reset, and ResetValidation methods, as well as an IsValid property.
    <MForm Model="_model" Context="form">
        <MTextField @bind-Value="_model.Name"></MTextField>
        <MTextField @bind-Value="_model.Email"></MTextField>
        <MSelect @bind-Value="_model.Item"
                  Items="@_items"
                  ItemText="u => u"
                  ItemValue="u => u">
        </MSelect>
        <MButton Block Disabled="@(!form.IsValid)" Color="success" Class="mb-2" OnClick="@(() => form.Validate())">Validate</MButton>
        <MButton Block Color="error" Class="mb-2" OnClick="@(() => form.Reset())">Reset Form</MButton>
        <MButton Block Color="warning" OnClick="@(() => form.ResetValidation())">Reset Validation</MButton>
    </MForm>
  • Form: add support for validate single field. #1980
  • Icon: add the TransitionShow prop to support the transition show condition. #1938
  • add support for updating top defaults. #1982

🐛 Bug fixes

  • BlockText: incorrect value set for key. #1978
  • DataTable: Update the CSS. #1976
  • Dialog: avoid the issue of potentially throwing exceptions when open and focus. #1970
  • EnqueuedSnackbars: fix the issue that may cause 'Collection was modified'. #1962 #1974 #1992
  • Form: the DisplayName will be recognized now after enabling i18n. #1940 #1943
  • Form: when using ObjectGraphDataAnnotationsValidator, error messages still exist when update value programmatically. #1941
  • Icon: svg's path doesn't work when assigned to the Icon prop. #1944
  • MobileCascader: the length of tab is not update after selection. #1960
  • PageTabs: RemoveAll method used the wrong argument. #1952
  • PullRefresh: should not preventDefault on touch move. #1950
  • Swiper: adding or removing slides requires notifying swiper to recalculate. #1955
  • Switch: UI issue when using the Dense or Label property with left-right text. #1963 #1985
  • Textarea: AutoGrow doesn't work. #1956
  • Textarea: incorrect font color when SoloInverted and focused. #1965
  • Toolbar: incorrect style when using the built-in color rules. #1959
  • MasaBlazorOptions should be registered as Scoped by default. #1945

♻️ Refactors

  • DataTable: optimize the logic for determining whether to display shadow for fixed columns. #1979
  • merge all code from BlazorComponent and remove its dependencies. #1936 #1939

📝 Documentation

  • Autocomplete: Update the usage example. #1957
  • DataTable: add example and support for editable cells. #1966
  • Forms: Update "Enable I18n". #1964
  • Treeview: use the internal data API. #1958
  • fix the cache issue when change the function name in masa-blazor.js. #1949 #1967
  • Supplementing the Chinese descriptions of some component APIs, thanks to @Lee-Lily-Lea #1988 #1989 #1991 #1990 #1994 #1997 #1998 #2001 #2000

🧩 Other

  • optimize release configuration to reduce file size. #1984

Full Changelog: 1.5.5...1.6.0