Skip to content

Menu - add custom url #493

@TrilipuT

Description

@TrilipuT

Hey!
Is it possible to add a custom url to menu ? Or even better - make it dynamic based on user.
I think something like function call might work?

{
            label: 'My House Vehicles',
            icon: 'material-symbols:car-tag-outline',
            resourceId: 'myvehicle',
            url: (adminUser)=>{
                return 'vehicles?filter__building__in=["'+adminUser.dbUser.building+'"]'
            },
}

My example:
I have database of vehicles. Each vehicle belongs to some building. There are admins of each building.
I want to have a menu item like "my building vehicles" where i can show only vehicles from building that assigned to current admin.

alternatively it can be static url and i can try read url param on beforeDatasourceRequest and try to add necessary filters.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions