Skip to content

[FEAT] Configurable Action Menu to Enable/Disable Controls #128

Closed
@norato

Description

@norato

Hello,

Thank you for your excellent work on this library! It has been incredibly helpful in our project.

Feature Request

I’d like to request a feature that allows customization of the action menu to enable or disable specific controls like Copy, Cut, Download, etc. This would improve the flexibility of the library for various use cases.


Use Cases

  1. Custom User Permissions: Restrict access to certain controls (e.g., disable "Download" for users without download permissions).
  2. Simplified UI: Hide unnecessary actions for a cleaner user experience.
  3. Dynamic Behavior: Adjust the action menu based on specific file/folder states or application logic.

Suggested Implementation

  • Configuration Options:
    Add a prop or configuration object to define which controls are visible or hidden.
    Example:
   <FileManager
     actionMenuConfig={{
       showCopy: true,
       showCut: true,
       showDownload: false,
     }}
   />

Default Values

All actions enabled by default for backward compatibility.

Current Workaround

I had to implement this programmatically by detecting menu items and manipulating their visibility in the DOM. While this works, it would be much cleaner and maintainable if the library supported it natively.

Thank you for considering this request. I’d be happy to provide further details or discuss possible approaches!

Best regards,
Felipe Norato

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions