From fbbd14b6916d6936fd5513834c56d6fd00ece7d8 Mon Sep 17 00:00:00 2001 From: Lucas Di Pentima Date: Tue, 3 Mar 2020 18:45:05 -0300 Subject: [PATCH] 15951: Makes 'mutually exclusive' filter dialog auto-submit selection on click. Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima --- .../data-table-filters-popover.tsx | 9 ++++++++ .../data-table-filters-tree.tsx | 5 ++--- src/components/tree/tree.tsx | 21 ++----------------- 3 files changed, 13 insertions(+), 22 deletions(-) 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 ||