@portnet/ui 0.1.34 → 0.1.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -65,9 +65,10 @@ const PuiSearchPage = _ref2 => {
|
|
|
65
65
|
onSubmit,
|
|
66
66
|
children: _children,
|
|
67
67
|
additionalActions,
|
|
68
|
-
collapsibleSearchSection =
|
|
68
|
+
collapsibleSearchSection = true // Collapsible by default
|
|
69
69
|
} = _ref2;
|
|
70
|
-
|
|
70
|
+
// Start with the section collapsed (not displayed on first render)
|
|
71
|
+
const [isSearchSectionExpanded, setSearchSectionExpanded] = (0, _react.useState)(false);
|
|
71
72
|
const toggleSearchSection = () => {
|
|
72
73
|
setSearchSectionExpanded(prev => !prev);
|
|
73
74
|
};
|
|
@@ -87,11 +88,11 @@ const PuiSearchPage = _ref2 => {
|
|
|
87
88
|
style: {
|
|
88
89
|
display: "flex",
|
|
89
90
|
alignItems: "center",
|
|
90
|
-
cursor: "pointer" //
|
|
91
|
+
cursor: collapsibleSearchSection ? "pointer" : "default" // Clickable only if collapsibleSearchSection is true
|
|
91
92
|
},
|
|
92
|
-
children: [isSearchSectionExpanded ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_ExpandLess.default, {}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_ExpandMore.default, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
93
|
+
children: [collapsibleSearchSection && (isSearchSectionExpanded ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_ExpandLess.default, {}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_ExpandMore.default, {})), /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
93
94
|
style: {
|
|
94
|
-
marginLeft: "8px"
|
|
95
|
+
marginLeft: collapsibleSearchSection ? "8px" : "0px"
|
|
95
96
|
},
|
|
96
97
|
children: "Param\xE8tres de recherche"
|
|
97
98
|
}), " "]
|
|
@@ -217,6 +218,6 @@ PuiSearchPage.defaultProps = {
|
|
|
217
218
|
formik: true,
|
|
218
219
|
loading: false,
|
|
219
220
|
additionalActions: [],
|
|
220
|
-
collapsibleSearchSection:
|
|
221
|
+
collapsibleSearchSection: true // Collapsible by default is true
|
|
221
222
|
};
|
|
222
223
|
var _default = exports.default = PuiSearchPage;
|