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

Sort field output when nested under object/list. #1609

Closed
mittalyashu opened this issue Aug 13, 2018 · 2 comments
Closed

Sort field output when nested under object/list. #1609

mittalyashu opened this issue Aug 13, 2018 · 2 comments

Comments

@mittalyashu
Copy link
Contributor

mittalyashu commented Aug 13, 2018

- Do you want to request a feature or report a bug? Not sure

- What is the current behavior?

I have fields setup this way.

image

I want the name to show up first and then colour, but the output is

image

First color and then name. Why?

(Example from the github repo)

carbon_2018-08-14_01-16-14

- What is the expected behavior?

I want the name to show up first and then colour.

- Please mention your versions where applicable.
Netlify CMS version: 2.0.9
Browser version: 68.0.3440.106

- Links

@tech4him1 tech4him1 changed the title Change the order of output Sort field output when nested under object/list. Aug 13, 2018
@tomrutgers
Copy link
Contributor

Current behaviour
Apparently the list widget is sorting the fields in alphabetical order internally.

Expected behavior
Output the fields the way the user declares them in the config

Changes to the widget (list/object/...)
Widgets should have an explicit sort function when needed.

Changes to the core
The CMS core should be able to accept the sort function from a widget.
If there's no sort function in the widget, the core should just parse the data 'as is'.

@erquhart
Copy link
Contributor

Color and then name because it's alphabetical. This is essentially an object and key order should not matter or be relied upon. I don't see us supporting this but feel free to comment if you feel it merits further discussion.

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

No branches or pull requests

3 participants