From: Lucas Di Pentima Date: Tue, 3 Mar 2020 21:45:05 +0000 (-0300) Subject: 15951: Makes 'mutually exclusive' filter dialog auto-submit selection on click. X-Git-Tag: 2.1.0~36^2~4 X-Git-Url: https://git.arvados.org/arvados-workbench2.git/commitdiff_plain/fbbd14b6916d6936fd5513834c56d6fd00ece7d8 15951: Makes 'mutually exclusive' filter dialog auto-submit selection on click. Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima --- diff --git a/src/components/data-table-filters/data-table-filters-popover.tsx b/src/components/data-table-filters/data-table-filters-popover.tsx index 670afa95..30b98d33 100644 --- a/src/components/data-table-filters/data-table-filters-popover.tsx +++ b/src/components/data-table-filters/data-table-filters-popover.tsx @@ -139,7 +139,15 @@ export const DataTableFiltersPopover = withStyles(styles)( mutuallyExclusive={this.props.mutuallyExclusive} onChange={filters => { this.setState({ filters }); + if (this.props.mutuallyExclusive) { + const { onChange } = this.props; + if (onChange) { + onChange(filters); + } + this.setState({ anchorEl: undefined }); + } }} /> + {this.props.mutuallyExclusive ||