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

[EuiCheckbox] fix inputRef prop on input element #4298

Merged
merged 7 commits into from
Dec 9, 2020
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: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
- Fixed `EuiDataGrid` column property `displayAsText`. Column headers prefer `displayAsText` over `id`; `display` still takes precedence. If provided, the filter in the sort-popover will search against `displayAsText` instead of `id`. ([#4351](https://github.com/elastic/eui/pull/4351))
- Fixed propagation of `esc` key presses closing parent popovers ([#4336](https://github.com/elastic/eui/pull/4336))
- Fixed overwritten `isDisabled` prop on `EuiListGroupItem` `extraAction` config ([#4359](https://github.com/elastic/eui/pull/4359))

- Fixed `inputRef` for `EuiCheckbox` ([#4298](https://github.com/elastic/eui/pull/4298))

**Theme: Amsterdam**

Expand Down
6 changes: 3 additions & 3 deletions src/components/form/checkbox/checkbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,11 @@ export class EuiCheckbox extends Component<EuiCheckboxProps> {
type,
disabled,
compressed,
indeterminate,
inputRef,
...rest
} = this.props;

const { indeterminate, ...inputProps } = rest; // `indeterminate` is set dynamically later

const classes = classNames(
'euiCheckbox',
type && typeToClassNameMap[type],
Expand Down Expand Up @@ -115,7 +115,7 @@ export class EuiCheckbox extends Component<EuiCheckboxProps> {
onChange={onChange}
disabled={disabled}
ref={this.setInputRef}
{...inputProps}
{...rest}
/>

<div className="euiCheckbox__square" />
Expand Down