Skip to content
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
- Added `markdownFormatProps` prop to `EuiMarkdownEditor` to extend the props passed to the rendered `EuiMarkdownFormat` ([#4663](https://github.com/elastic/eui/pull/4663))
- Added optional virtualized line rendering to `EuiCodeBlock` ([#4952](https://github.com/elastic/eui/pull/4952))

**Bug fixes**

- Fixed filter count of 0 in `EuiSearchBar` ([#4977](https://github.com/elastic/eui/pull/4977))

## [`36.0.0`](https://github.com/elastic/eui/tree/v36.0.0)

- Refactored `EuiFlyout` types ([#4940](https://github.com/elastic/eui/pull/4940))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@ exports[`FieldValueSelectionFilter active - field is global 1`] = `
button={
<EuiFilterButton
grow={true}
hasActiveFilters={true}
hasActiveFilters={false}
iconSide="right"
iconType="arrowDown"
numActiveFilters={0}
onClick={[Function]}
>
Tag
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -342,15 +342,16 @@ export class FieldValueSelectionFilter extends Component<
? this.state.options.all.some((item) => this.isActiveField(item.field))
: false;

const active = activeTop || activeItem;
const activeItemsCount = this.state.activeItems.length;
const active = (activeTop || activeItem) && activeItemsCount > 0;

const button = (
<EuiFilterButton
iconType="arrowDown"
iconSide="right"
onClick={this.onButtonClick.bind(this)}
hasActiveFilters={active}
numActiveFilters={active ? this.state.activeItems.length : undefined}
numActiveFilters={active ? activeItemsCount : undefined}
grow>
{config.name}
</EuiFilterButton>
Expand Down