Skip to content

Commit

Permalink
Merge pull request #541 from Ferlab-Ste-Justine/fix/SJIP-959
Browse files Browse the repository at this point in the history
fix(quickfilter): SJIP-959 range should not show a button dropdown in…
  • Loading branch information
lflangis authored Oct 17, 2024
2 parents 8446a89 + a8b06df commit 8aaa5a5
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 29 deletions.
3 changes: 3 additions & 0 deletions packages/ui/Release.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
### 10.10.8 2024-10-17
- fix: SJIP-959 Range should not show a button dropdown in quickfilter

### 10.10.8 2024-10-16
- fix: CLIN-3284 fix error 500 query

Expand Down
4 changes: 2 additions & 2 deletions packages/ui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ferlab/ui",
"version": "10.10.8",
"version": "10.10.9",
"description": "Core components for scientific research data portals",
"publishConfig": {
"access": "public"
Expand Down
68 changes: 42 additions & 26 deletions packages/ui/src/components/SidebarMenu/QuickFilter/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -250,32 +250,48 @@ const QuickFilter = ({
>
{get(dictionary, 'actions.clear', 'Clear')}
</Button>
<Dropdown.Button
className={styles.applyBtn}
disabled={selectedFacet && !selectedFacetOptions.length}
menu={{
items: [
{
key: TermOperators.in,
label: get(dictionary, 'operators.anyOf', 'Any of'),
},
{
key: TermOperators.all,
label: get(dictionary, 'operators.allOf', 'All of'),
},
{
key: TermOperators['not-in'],
label: get(dictionary, 'operators.noneOf', 'None of'),
},
],
onClick: (e) => applyFacetFilters(e.key as TermOperators),
}}
onClick={() => applyFacetFilters(TermOperators.in)}
size="small"
type="primary"
>
{get(dictionary, 'actions.apply', 'Apply')}
</Dropdown.Button>
{qfFacetOptions?.filterGroup.type != VisualType.Range ? (
<Dropdown.Button
className={styles.applyBtn}
disabled={selectedFacet && !selectedFacetOptions.length}
menu={{
items: [
{
key: TermOperators.in,
label: get(dictionary, 'operators.anyOf', 'Any of'),
},
{
key: TermOperators.all,
label: get(dictionary, 'operators.allOf', 'All of'),
},
{
key: TermOperators['not-in'],
label: get(
dictionary,
'operators.noneOf',
'None of',
),
},
],
onClick: (e) => applyFacetFilters(e.key as TermOperators),
}}
onClick={() => applyFacetFilters(TermOperators.in)}
size="small"
type="primary"
>
{get(dictionary, 'actions.apply', 'Apply')}
</Dropdown.Button>
) : (
<Button
className={styles.applyBtn}
disabled={selectedFacet && !selectedFacetOptions.length}
onClick={() => applyFacetFilters(TermOperators.in)}
size="small"
type="primary"
>
{get(dictionary, 'actions.apply', 'Apply')}
</Button>
)}
</div>
</>
) : (
Expand Down

0 comments on commit 8aaa5a5

Please sign in to comment.