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

Ordering is inconsistently determined #70

Open
jgolieb opened this issue Sep 27, 2016 · 1 comment
Open

Ordering is inconsistently determined #70

jgolieb opened this issue Sep 27, 2016 · 1 comment

Comments

@jgolieb
Copy link

jgolieb commented Sep 27, 2016

The order of formPanels, questionSets, and questions seems to be inconsistent. Questions are ordered by their array order. QuestionSets, seem to be controlled by their array order in the questionPanels.questionSets array as well, rather than by the index property shown in the examples. As for formPanels, looking at the code, I find that they do get sorted by their index property (index.js line 21).

This is inconsistent, but may be intentional for some reason. If so, the index property of the questionSet should be omitted from documentation as it is misleading and never used. Personally, I'd rather see the ordering of everything be based on the actual array order rather then an index property. However, it could also be configurable, or index could be used if present with fallback to array order. Most importantly, this should be implemented consistently.

@andrewhathaway
Copy link
Owner

Hi @jgolieb, apologies for the late response. You are correct in this one, form panels are ordered by their index. However, other indexes are used as IDs essentially, this may be an oversight. As the indexes are actually valuable, ideally they'd all be ordered by an index.

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

2 participants