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

A few fixes required to get [email protected] working in Kibana #1603

Merged
merged 4 commits into from
Feb 26, 2019
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
**Bug fixes**

- `EuiBasicTable` select all shows up on mobile ([#1462](https://github.com/elastic/eui/pull/1462))
- Adds missing `hasActiveFilters` prop for `EuiFilterButton` type and fixes `onChange` signature for `EuiButtonGroup` ([#1603](https://github.com/elastic/eui/pull/1603))

**Breaking changes**

Expand Down
2 changes: 1 addition & 1 deletion src/components/button/button_group/button_group.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export const EuiButtonGroup = ({
key={index}
label={option.label}
name={option.name || name}
onChange={onChange.bind(null, option.id, option.value)}
onChange={() => onChange(option.id, option.value)}
size={buttonSize}
toggleClassName="euiButtonGroup__toggle"
type={type}
Expand Down
4 changes: 2 additions & 2 deletions src/components/button/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CommonProps } from '../common';
import { CommonProps, Omit } from '../common';
import { IconType, IconSize } from '../icon'
import { ToggleType } from '../toggle'

Expand Down Expand Up @@ -146,6 +146,6 @@ declare module '@elastic/eui' {
}

export const EuiButtonGroup: FunctionComponent<
HTMLAttributes<HTMLDivElement> & EuiButtonGroupProps
Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> & EuiButtonGroupProps
>;
}
5 changes: 3 additions & 2 deletions src/components/filter_group/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { CommonProps } from '../common';
import { IconType, IconSize } from '../icon'
import { IconType, IconSize } from '../icon';
/// <reference path="../button/index.d.ts" />

import { Component, FunctionComponent, ButtonHTMLAttributes, HTMLAttributes } from 'react';
Expand All @@ -14,6 +14,7 @@ declare module '@elastic/eui' {
export interface EuiFilterButtonProps {
numFilters?: number;
numActiveFilters?: number;
hasActiveFilters?: boolean;
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks!

isSelected?: boolean;
isDisabled?: boolean;
type?: string;
Expand All @@ -38,7 +39,7 @@ declare module '@elastic/eui' {

export type FilterChecked = 'on' | 'off';
export interface EuiFilterSelectItemProps {
checked?: FilterChecked
checked?: FilterChecked;
}

export const EuiFilterSelectItem: Component<CommonProps &
Expand Down