From 82b5698f9556d1b83778455f593b1fa21bce0298 Mon Sep 17 00:00:00 2001 From: tischsoic Date: Fri, 1 Nov 2024 18:10:12 +0100 Subject: [PATCH] added yaml config, adjusted contexts --- .../config/universal_discovery_widget.yaml | 8 + .../selected-locations/selected.locations.js | 2 - .../components/view-switcher/view.switcher.js | 7 +- .../universal.discovery.module.js | 179 +++++++++--------- 4 files changed, 106 insertions(+), 90 deletions(-) diff --git a/src/bundle/Resources/config/universal_discovery_widget.yaml b/src/bundle/Resources/config/universal_discovery_widget.yaml index 32feca3396..6831785129 100644 --- a/src/bundle/Resources/config/universal_discovery_widget.yaml +++ b/src/bundle/Resources/config/universal_discovery_widget.yaml @@ -80,3 +80,11 @@ system: multiple: false image_picker: active_tab: 'browse' + products_tab: + active_tab: 'products' + active_sort_clause: 'ContentName' + active_view: 'product-tab-table-view' + tabs_config: + products: + items_per_page: 50 + priority: 30 diff --git a/src/bundle/ui-dev/src/modules/universal-discovery/components/selected-locations/selected.locations.js b/src/bundle/ui-dev/src/modules/universal-discovery/components/selected-locations/selected.locations.js index d32b0279ab..7f809b2365 100644 --- a/src/bundle/ui-dev/src/modules/universal-discovery/components/selected-locations/selected.locations.js +++ b/src/bundle/ui-dev/src/modules/universal-discovery/components/selected-locations/selected.locations.js @@ -15,7 +15,6 @@ import { SelectedLocationsContext, AllowConfirmationContext } from '../../univer const SelectedLocations = () => { const Translator = getTranslator(); const refSelectedLocations = useRef(null); - const refTogglerButton = useRef(null); const [selectedLocations, dispatchSelectedLocationsAction] = useContext(SelectedLocationsContext); const allowConfirmation = useContext(AllowConfirmationContext); const [isExpanded, setIsExpanded] = useState(false); @@ -54,7 +53,6 @@ const SelectedLocations = () => { const renderToggleButton = () => { return (