You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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':
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.
The text was updated successfully, but these errors were encountered:
I managed to inherit both reference and reference_many fields. If you want the new Field to keep functioning like the reference_many field, you must not override the _type in the child class. Some of the logic in the code is too coupled to the reference fields.
Since you should not override the _type, you dont need to register a view. Instead set the template in the constructor of your child field class.
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':
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.
The text was updated successfully, but these errors were encountered: