SoftwareBrothers / adminjs

AdminJS is an admin panel for apps written in node.js
https://adminjs.co
MIT License
8.06k stars 646 forks source link

[Feature]: Overriding the create new resource actions button #1652

Closed BuhayovA closed 3 months ago

BuhayovA commented 3 months ago

Description

Screenshot 2024-04-07 at 9 36 12 PM

I want to override this "Create New" and "Filter" buttons, for example. At the moment I have not found a solution on how to do this.

Suggested Solution

add this links type into the override method. Or, you can add the option to include your custom component within the "recourse" settings (path: "recourse.options.actions.new.buttonComponent"). Currently, you can only modify the icon and text (but this requires altering the locale).

Alternatives

No response

Additional Context

No response

BuhayovA commented 3 months ago

Pardon. After 2 days of continuous work, my brain didn't notice the obvious solution. Use "override" and "ActionHeader" type.