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

How to render a 'reference_many' field just like a 'referenced_list' field #1316

Open
garethsb-ghost opened this issue Mar 5, 2017 · 6 comments

Comments

@garethsb-ghost
Copy link

The default rendering of reference_many is appropriate for things like tags and categories. In my use case, the user experience should be the same as for referenced_list, even though the relationship is held in the opposite (reference_many) direction. I'd like to see a list view even if only showing a single target field (although the option of multi column with several target fields just like referenced_list would be even better).

Probably this is possible now or an enhancement that could be added, but I haven't been able to work out how yet. Guidance gratefully received.

@Phocea
Copy link
Contributor

Phocea commented Mar 16, 2017

You could try with a template or by using a custom type

@Kmaschta
Copy link
Contributor

Hello,

As explained in the README, the GitHub issue tracker is for bugs and enhancement requests.
So I close this issue, but feel free to write a question on StackOverflow with the tag ng-admin.

Thanks for using ng-admin!

@garethsb-ghost
Copy link
Author

I considered this an enhancement request. Maybe I haven't investigated enough but as a new user who read through all the docs and examples and browsed the implementation, I couldn't see how this could be achieved.

@Kmaschta
Copy link
Contributor

My bad! I open it again.

@Kmaschta Kmaschta reopened this Mar 30, 2017
@garethsb-ghost
Copy link
Author

Thank you, @Kmaschta. If there's a simple way to achieve this, I'd love to know and it'd make a good example in the docs. :-)

@Kmaschta
Copy link
Contributor

If you want to write a PR, I suggest you to add an option to the ReferenceManyField to display something else than a ChoiceField (which is a ui-select).

Otherwise, the only way to change the reference_many is to write a custom type (as suggested by Phocea).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants