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

[Select] Fix some W3C issues #11983

Merged
merged 1 commit into from
Jun 26, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/src/pages/customization/css-in-js/css-in-js.md
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,8 @@ const Styled = createStyled(theme => ({
}));
```

[@jedwards1211](https://github.com/jedwards1211) Has taken the time to move this module into a package: [material-ui-render-props-styles](https://github.com/jcoreio/material-ui-render-props-styles). Feel free to use it.

### styled-components API (+15 lines)

styled-components's API removes the mapping between components and styles. Using components as a low-level styling construct can be simpler.
Expand Down
1 change: 0 additions & 1 deletion packages/material-ui/src/Input/Input.js
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,6 @@ class Input extends React.Component {
{startAdornment}
<InputComponent
aria-invalid={error}
aria-required={required}
autoComplete={autoComplete}
autoFocus={autoFocus}
className={inputClassName}
Expand Down
3 changes: 1 addition & 2 deletions packages/material-ui/src/RadioGroup/RadioGroup.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,12 @@ class RadioGroup extends React.Component {

return (
<FormGroup role="radiogroup" {...other}>
{React.Children.map(children, (child, index) => {
{React.Children.map(children, child => {
if (!React.isValidElement(child)) {
return null;
}

return React.cloneElement(child, {
key: index,
name,
inputRef: node => {
if (node) {
Expand Down
8 changes: 7 additions & 1 deletion packages/material-ui/src/Select/SelectInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ class SelectInput extends React.Component {
open: openProp,
readOnly,
renderValue,
required,
SelectDisplayProps,
tabIndex: tabIndexProp,
type = 'hidden',
Expand All @@ -186,6 +187,8 @@ class SelectInput extends React.Component {
} = this.props;
const open = this.isOpenControlled && this.displayNode ? openProp : this.state.open;

delete other['aria-invalid'];

let display;
let displaySingle = '';
const displayMultiple = [];
Expand Down Expand Up @@ -283,7 +286,6 @@ class SelectInput extends React.Component {
<input
value={Array.isArray(value) ? value.join(',') : value}
name={name}
readOnly={readOnly}
ref={this.handleInputRef}
type={type}
{...other}
Expand Down Expand Up @@ -411,6 +413,10 @@ SelectInput.propTypes = {
* @returns {ReactElement}
*/
renderValue: PropTypes.func,
/**
* @ignore
*/
required: PropTypes.bool,
/**
* Properties applied to the clickable div element.
*/
Expand Down