Skip to content

Commit

Permalink
BASIRA #257 - Updating react-components to latest versions; Adding "e…
Browse files Browse the repository at this point in the history
…ditable" prop to FacetSlider in SearchFacets
  • Loading branch information
dleadbetter committed Nov 29, 2024
1 parent c53bb77 commit 8775003
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 16 deletions.
4 changes: 2 additions & 2 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"dependencies": {
"@babel/eslint-parser": "^7.21.3",
"@babel/runtime": "^7.22.3",
"@performant-software/semantic-components": "^2.2.17",
"@performant-software/shared-components": "^2.2.17",
"@performant-software/semantic-components": "^2.2.18",
"@performant-software/shared-components": "^2.2.18",
"@testing-library/jest-dom": "^5.11.4",
"@testing-library/react": "^11.1.0",
"@testing-library/user-event": "^12.1.10",
Expand Down
7 changes: 1 addition & 6 deletions client/src/components/SearchFacets.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {
import React, { useCallback, useRef } from 'react';
import { useTranslation } from 'react-i18next';
import {
useHits,
useRange,
useRefinementList,
useToggleRefinement
Expand All @@ -24,7 +23,6 @@ const MAX_SHOW_MORE_LIMIT = 1000;

const SearchFacets = (props: any) => {
const { getLabel } = useFacetLabels();
const { hits } = useHits(props);
const { t } = useTranslation();

const refs = useRef([]);
Expand Down Expand Up @@ -68,10 +66,6 @@ const SearchFacets = (props: any) => {
*/
const setRef = useCallback((element) => refs.current.push(element), [refs]);

if (_.isEmpty(hits)) {
return null;
}

return (
<Segment
className='search-facets'
Expand All @@ -93,6 +87,7 @@ const SearchFacets = (props: any) => {
<FacetSlider
attribute='artwork.date_range_facet'
defaultActive={false}
editable
ref={setRef}
title={getLabel('artwork.date_range_facet')}
useRangeSlider={useRange}
Expand Down
16 changes: 8 additions & 8 deletions client/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2549,10 +2549,10 @@
"@nodelib/fs.scandir" "2.1.5"
fastq "^1.6.0"

"@performant-software/semantic-components@^2.2.17":
version "2.2.17"
resolved "https://registry.yarnpkg.com/@performant-software/semantic-components/-/semantic-components-2.2.17.tgz#3ca3d4d236a36b4feeea871f285bfc3648e1b7d3"
integrity sha512-nSQpHsFjq5sWlBp0yw5i/sCNIYjK5BHLoIc2vKEJ804v7jPvFWmhIzDC7hnRl00iR+Dlf3XPcmcgNlpXsTjEtw==
"@performant-software/semantic-components@^2.2.18":
version "2.2.18"
resolved "https://registry.yarnpkg.com/@performant-software/semantic-components/-/semantic-components-2.2.18.tgz#14ab574484afdc07c19e8ee6717b6e656e02e72e"
integrity sha512-Ejz5kUQMViDizkPwG2wFWO6LIc977WAnzSnmU0D6ZEpTdQT8Dxarz9beKJN4p2nBr/WCFHBbMx2XqRjMx8uW8A==
dependencies:
"@react-google-maps/api" "^2.8.1"
axios "^0.26.1"
Expand All @@ -2570,10 +2570,10 @@
zotero-api-client "^0.40.0"
zotero-translation-client "^5.0.1"

"@performant-software/shared-components@^2.2.17":
version "2.2.17"
resolved "https://registry.yarnpkg.com/@performant-software/shared-components/-/shared-components-2.2.17.tgz#d3aed2d957f6d711273ba8a20c9566e449778cbc"
integrity sha512-BQPj2bYjJPzjJi/NGQ0gURSadft9V+3ajJLJ2MXrrRIaWlPyH4HEA+5mD1sxlayEx0FGcWculdUh6V8MFAetIA==
"@performant-software/shared-components@^2.2.18":
version "2.2.18"
resolved "https://registry.yarnpkg.com/@performant-software/shared-components/-/shared-components-2.2.18.tgz#8c32e889606debd59aecb12de6d297fafad0d0dc"
integrity sha512-N/WDflcliCGRl9urVYFEw5oiEbVMEGc/RyYigsa9ozWAbUscmKUXdwsZxJ9ydqrmj+Q1DCCMiezNycXgaY3WAQ==
dependencies:
"@react-google-maps/api" "^2.8.1"
axios "^0.26.1"
Expand Down

0 comments on commit 8775003

Please sign in to comment.