Skip to content

Impossible to extend reference_many field #1225

Open
@gartner

Description

@gartner

Using ng-admin alpha7.

It doesn't seem to be possible to extend a reference_many field.

I copied the ReferenceManyField.js and ReferenceManyFieldView.js, renamed them, and renamed the class in it.
I then registered my new field as tag_reference_many.

When creating a field of this type 'tag_reference_many' it does render, but no labels are added in the displayed 'select multiple':

    nga.field('categories', 'tag_reference_many')
        .label('Kategorier')
        .targetEntity(categories)
        .targetField(nga.field('navn'))
        .validation({required: true})

If I create the field with the above, but just as a 'reference_many' it is working as it should, displaying the labels.

When creating the field definition, I did nothing more than copying the reference_many field type/field view files and renaming the field._type in them.

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