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

Fix ordering select widget #501

Merged
merged 3 commits into from
Sep 27, 2016

Conversation

rpkilby
Copy link
Collaborator

@rpkilby rpkilby commented Sep 23, 2016

Fixes #496. Supersedes and closes #499.

  • Changed CSVWidget => BaseCSVWidget
    • The rendering behavior only forces a text input when there are multiple values to render (ie, you directly modify the url query params to have multiple values).
    • If there are one or zero values, the mixed-in widget is used to render (such as select, date input, etc...), making the widget suitable to use in forms.
    • Form usage will generally only for allow one input (e.g, a select/date input can only provide one value).
    • API usage allows for comma-separated values.
  • Re-added CSVWidget class that is the base widget pre-mixed w/ TextInput. This mimics the previous behavior and is used by the CSVRangeField, as range only accept two values via comma separation.
  • BaseCSVField will now mix the main widget class w/ BaseCSVWidget (making CSVSelects, CSVDateInputs, etc...). This the same way a mixed-in csv filter will make it's derivative mixed-in csv field.

Copy link
Owner

@carltongibson carltongibson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is really rather good 🙂.

@carltongibson carltongibson merged commit 153d25a into carltongibson:develop Sep 27, 2016
@rpkilby rpkilby deleted the fix-ordering-select branch November 2, 2016 12:07
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

Successfully merging this pull request may close these issues.

2 participants