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

Allow deselection of optional SelectField #120

Merged
merged 8 commits into from
Oct 28, 2016

Conversation

todda00
Copy link
Contributor

@todda00 todda00 commented Oct 28, 2016

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.

@radekmie radekmie added the Type: Feature New features and feature requests label Oct 28, 2016
@radekmie
Copy link
Contributor

It looks great! I'm waiting for the rest.

@todda00
Copy link
Contributor Author

todda00 commented Oct 28, 2016

might want to wait to publish, I have a minor PR I am going to submit for BS4 today.

@radekmie
Copy link
Contributor

radekmie commented Oct 28, 2016

@@ -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}) =>
Copy link
Contributor

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}) =>
Copy link
Contributor

Choose a reason for hiding this comment

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

This one too.

Copy link
Contributor

@radekmie radekmie left a 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);

Copy link
Contributor

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.

Copy link
Contributor

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)

Copy link
Contributor Author

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.

Copy link
Contributor Author

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);

Copy link
Contributor

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>
Copy link
Contributor

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>
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here.

@radekmie radekmie merged commit e97ba2d into vazco:master Oct 28, 2016
@radekmie
Copy link
Contributor

Great job.
Thanks, @todda00!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature New features and feature requests
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants