FileManager custom context menu for files not showing icons except for default items and last custom item

Hello Syncfusion Team,


When using custom Context Menu For Files, When I try to set the css property for icons, only

default items and last custom item the icon, and other custom items icon not showing. please refer to the code below and image of context menu. image url https://i.imgur.com/xZ8LY24.jpg

Please note: We are using nugets v24.1.45

@using Syncfusion.Blazor.FileManager;

<div class="control-section">

    <SfFileManager TValue="FileManagerDirectoryContent" @ref="FileManager">

        <FileManagerAjaxSettings Url="/api/FileManager/FileOperations"

                                 UploadUrl="/api/FileManager/Upload"

                                 DownloadUrl="/api/FileManager/Download"

                                 GetImageUrl="/api/FileManager/GetImage">

        </FileManagerAjaxSettings>

        <FileManagerContextMenuSettings File="@FileItems"></FileManagerContextMenuSettings>

        <FileManagerEvents TValue="FileManagerDirectoryContent" MenuOpened="MenuOpened" OnMenuClick="OnMenuClick"></FileManagerEvents>

    </SfFileManager>

</div>


@code {

    SfFileManager<FileManagerDirectoryContent> FileManager;

   public string[] FileItems { get; set; } = new string[] { "Open", "Cut", "Copy", "|", "Delete", "Download", "Rename", "Details", "Versions", "Restore", "Undo" };


    //// Icon added to custom menu item

    void MenuOpened(MenuOpenEventArgs<FileManagerDirectoryContent> args)

    {

      if (args.MenuType == "File")

      {

         if (args.Items.FirstOrDefault(x => x.Text == "Versions") is not null)

            args.Items.FirstOrDefault(x => x.Text == "Versions")!.IconCss = "e-icons e-eye";

         if (args.Items.FirstOrDefault(x => x.Text == "Restore") is not null)

            args.Items.FirstOrDefault(x => x.Text == "Restore")!.IconCss = "e-icons e-undo";

         if (args.Items.FirstOrDefault(x => x.Text == "Undo") is not null)

            args.Items.FirstOrDefault(x => x.Text == "Undo")!.IconCss = "e-icons e-search";

      }

    }


    //// event for custom menu item

    void OnMenuClick(MenuClickEventArgs<FileManagerDirectoryContent> args)

    {

        ...

    }

}


Best Regards,

Ahmed



3 Replies 1 reply marked as answer

PM Prasanth Madhaiyan Syncfusion Team January 17, 2024 01:45 PM UTC

Hi Ahmed,


Greetings from Syncfusion support.


We have checked the reported issue in the Blazor FileManager component and have considered it as a bug on our end. The fix for this issue will be included in our service pack (SP) release, scheduled for the end of January 2024. You can track the status of the fix through the following link.


Feedback: https://www.syncfusion.com/feedback/50042/facing-an-icon-issue-when-we-add-new-custom-items-to-the-blazor-filemanager


Regards,

Prasanth Madhaiyan.



AS Ahmed Samy replied to Prasanth Madhaiyan January 17, 2024 02:09 PM UTC

Hi Prasanth,

Thank you for your response.



PM Prasanth Madhaiyan Syncfusion Team February 1, 2024 09:07 AM UTC

Hi Ahmed,


Thanks for your patience.


We are glad to announce that our patch release (V24.1.47) has been rolled out successfully. The issue with the “Facing an icon issue when we add new custom items to the Blazor FileManager context menu” has been resolved in this release. To access this fix, we suggest you update the package to 24.1.47 and we include the sample in the latest version for your reference.


Sample: Attached as a zip file.


Feedback: https://www.syncfusion.com/feedback/50042/facing-an-icon-issue-when-we-add-new-custom-items-to-the-blazor-filemanager


Release Notes: https://blazor.syncfusion.com/documentation/release-notes/24.1.47?type=all#file-manager


We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance.


Regards,

Prasanth Madhaiyan.


Attachment: BlazoFileManagerSample_543e7d34.zip

Marked as answer
Loader.
Up arrow icon