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

[Bug]: [@admins/relations] custom action icon not shown #1658

Open
captHarlock69 opened this issue Apr 17, 2024 · 0 comments
Open

[Bug]: [@admins/relations] custom action icon not shown #1658

captHarlock69 opened this issue Apr 17, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@captHarlock69
Copy link

Contact Details

No response

What happened?

added a new custom action to a resource A with "icon" property.
In the list page of the resource the icon is correctly show.
In a second resource B I added a oneToMany relation to resource B but when I enter in frontend of resource B in the relations-list I see there is a button with the custom action but with an empy box . Action handler is called properly. Only icon not visible.

Bug prevalence

whenever I open che relation "show" in frontend

AdminJS dependencies version

adminjs version 7.81
admin/relations version 1.1.2

What browsers do you see the problem on?

No response

Relevant log output

No response

Relevant code that's giving you issues

// preson.resource.ts
import { targetRelationSettingsFeature } from '@adminjs/relations';
import { Person } from './models/index.js';

export const createPersonResource = () => ({
  resource: Person,
  options: {
    actions: {
       addChild: {
         actionType: 'record',
         isVisible: true,
         isAccessible: true,
         icon: 'PlusCircle' // <--- just added this
         component: AddChildComponent,
         handler: () => {} // my handler
       }
    }
  },
  features: [targetRelationSettingsFeature()],
});

// team.resource.ts --> as in examples
@captHarlock69 captHarlock69 added the bug Something isn't working label Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant