Skip to content

Delete button directive-params are overriden by state-params #535

@vasiakorobkin

Description

@vasiakorobkin

Here you can see that directive params (entity and id) are always overriden with state params (entry and id from object which is returned from $state.params call).
In practice it causes wrong behaviour whenever we try to place Delete button in other entity's view. For example I have Post which may have many Images and use referenced_list field type to view list of related Images in Post's edit view. If i place <ma-delete-button entry="::entry" entity="::entity()" size="xs"></ma-delete-button> directive to the refernced_list table (as template field type), delete button will direct user to the Post deletion view, not Image deletion view. This is a bug, and I've made a fix for it: vasiakorobkin/ng-admin@2534ba3

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions