-
-
Notifications
You must be signed in to change notification settings - Fork 245
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
Allow deselection of optional SelectField #120
Conversation
It looks great! I'm waiting for the rest. |
might want to wait to publish, I have a minor PR I am going to submit for BS4 today. |
@@ -33,7 +33,7 @@ const renderCheckboxes = ({allowedValues, disabled, fieldType, id, name, onChang | |||
) | |||
; | |||
|
|||
const renderSelect = ({allowedValues, disabled, id, inputRef, name, onChange, placeholder, transform, value}) => | |||
const renderSelect = ({allowedValues, disabled, id, inputRef, label, name, onChange, placeholder, required, transform, value}) => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line is not passing ESLint.
@@ -30,7 +30,7 @@ const renderCheckboxes = ({allowedValues, disabled, fieldType, id, name, onChang | |||
) | |||
; | |||
|
|||
const renderSelect = ({allowedValues, disabled, id, inputRef, name, onChange, placeholder, transform, value}) => | |||
const renderSelect = ({allowedValues, disabled, id, inputRef, label, name, onChange, placeholder, required, transform, value}) => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hope you won't get mad.
@@ -64,4 +64,3 @@ const Select = props => | |||
; | |||
|
|||
export default connectField(Select); | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's required by ESLint.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(or at least it should)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure why the commit removed the line, its showing in my editor, but its not committing it back with the newline at the end, strange.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
our OS must handle it differently, I am seeing the newline in my editor and the line count on Github indicates the newline is there
@@ -64,4 +64,3 @@ const Select = props => | |||
; | |||
|
|||
export default connectField(Select); | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's required by ESLint.
{transform ? transform(value) : value} | ||
</option> | ||
)} | ||
</select> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please do it exactly the same like in the other places? Like here.
{transform ? transform(value) : value} | ||
</option> | ||
)} | ||
</select> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here.
Great job. |
Reference Issue: #119
Tested with optional, required, with and without placeholders. Also tested with Nested objects and arrays of objects.
If this looks acceptable, I will commit more to this PR/branch for the other 3 UI packages.