Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
norato opened this issue Jan 6, 2025 · 2 comments
Open

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

norato opened this issue Jan 6, 2025 · 2 comments
Labels
enhancement New feature or request

Comments

@norato
Copy link

norato commented Jan 6, 2025

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

@Saifullah-dev
Copy link
Owner

@norato Thank your for suggesting this feature. It would indeed be a great addition to React File Manager and I can see how useful it would be for applications with role based access/permissions and other use cases.

I'm considering this feature for the next release 🙌

@Saifullah-dev Saifullah-dev added the enhancement New feature or request label Jan 15, 2025
@Saifullah-dev Saifullah-dev changed the title Feature Request: Configurable Action Menu to Enable/Disable Controls [FEAT] Configurable Action Menu to Enable/Disable Controls Jan 15, 2025
@mna-intend
Copy link

@Saifullah-dev It would be also cool to change the name of the controls and the action menu. I want to use another language in my case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

No branches or pull requests

3 participants