How should icons be referenced in SASS based UI for ASP.NET Core builds in FileManager custom toolbar commands - old textual icon name not working in 2023.2.606.

1 Answer 118 Views
FileManager
Michael
Top achievements
Rank 2
Iron
Iron
Iron
Michael asked on 14 Jun 2023, 06:14 PM | edited on 14 Jun 2023, 06:15 PM

We have a custom command in a UI for ASP.NET Core FileManager control that states the icon as a simple textual name which worked fine in 2023.1.117


items.Add("").Type("button").Name("refresh").Icon("reload").Text("Refresh").Click("onRefresh").HtmlAttributes(new { style = "margin-left: 5px;" });
After upgrading to 2023.2.606 the icon no longer shows so am curious how the icon should now be referenced.  I've tried using k-svg style class names but to no avail and even using SpriteCssClass with FontAwesome classes is not working.  Could the Custom Command demo for the FileManager be tweaked to show a custom command with a custom icon in the manner that is required for the new SASS + FontIcon + SvgIcon based builds of UI for ASP.NET Core.

1 Answer, 1 is accepted

Sort by
0
Accepted
Stoyan
Telerik team
answered on 19 Jun 2023, 02:40 PM

Hi Michael,

With the change to svg icons some of the icons' names have changed as well. The new name of the icon is arrowRotateCwIcon.

To solve the issue you can either:

  • use the svg icon 
    items.Add(" ").Type("button").Name("refresh").Icon("arrowRotateCwIcon").Text("Refresh").Click("onRefresh").HtmlAttributes(new { style = "margin-left: 5px;" });
    or

  • revert back to the font icons without changing the current icon configuration - 

    server-side approach:
                services.AddKendo(x =>
                {
                    x.IconType = IconType.Font;
                });

client-side approach:

kendo.setDefaults('iconType', 'font');

For the full list of the SVG icons refer to this Kendo Angular demo.

Finally, I will start an internal discussion about the missing SVG icons list in the Kendo UI for jQuery and Telerik UI's documentations.

As a thank you for bringing that to our attention I've updated your Telerik points.

Regards,
Stoyan
Progress Telerik

As of R2 2023, the default icon type will be SVG instead of Font. See this blogpost for more information.
Tags
FileManager
Asked by
Michael
Top achievements
Rank 2
Iron
Iron
Iron
Answers by
Stoyan
Telerik team
Share this question
or