ods-component-lib 1.18.189 → 1.18.190
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.
|
@@ -13,6 +13,7 @@ export interface FilterProps {
|
|
|
13
13
|
buttonAdvancedSearchName?: string;
|
|
14
14
|
buttonClearAllName: string;
|
|
15
15
|
buttonApplyName: string;
|
|
16
|
+
advancedFilterClosed?: boolean;
|
|
16
17
|
}
|
|
17
18
|
declare const OdsFilter: (props: PropsWithChildren<FilterProps>) => React.JSX.Element;
|
|
18
19
|
export default OdsFilter;
|
package/dist/index.js
CHANGED
|
@@ -1652,15 +1652,14 @@ var OdsFilter = function OdsFilter(props) {
|
|
|
1652
1652
|
var _useState = React.useState(true),
|
|
1653
1653
|
showFilter = _useState[0],
|
|
1654
1654
|
setShowFilter = _useState[1];
|
|
1655
|
-
var _useState2 = React.useState(
|
|
1655
|
+
var _useState2 = React.useState(!props.advancedFilterClosed),
|
|
1656
1656
|
showAdvanceFilter = _useState2[0],
|
|
1657
|
-
|
|
1657
|
+
setShowAdvanceFilter = _useState2[1];
|
|
1658
1658
|
var hasAdvancedFilters = props.advancedFilterRow !== undefined;
|
|
1659
1659
|
var hasTagFilter = props.tabs !== undefined;
|
|
1660
1660
|
var hasFilterRow = props.filterRow !== undefined;
|
|
1661
1661
|
React.useEffect(function () {
|
|
1662
|
-
|
|
1663
|
-
if (props.filterTag && ((_props$filterTag = props.filterTag) === null || _props$filterTag === void 0 ? void 0 : _props$filterTag.length) > 0) handleHideShowFilter();
|
|
1662
|
+
if (props.filterTag && props.filterTag.length > 0) handleHideShowFilter();
|
|
1664
1663
|
}, [props.filterTag]);
|
|
1665
1664
|
var onFinish = function onFinish(values) {
|
|
1666
1665
|
if (props.onFinish) {
|
|
@@ -1668,7 +1667,7 @@ var OdsFilter = function OdsFilter(props) {
|
|
|
1668
1667
|
}
|
|
1669
1668
|
};
|
|
1670
1669
|
var handleHideShowAdvancedFilter = function handleHideShowAdvancedFilter() {
|
|
1671
|
-
|
|
1670
|
+
setShowAdvanceFilter(!showAdvanceFilter);
|
|
1672
1671
|
};
|
|
1673
1672
|
var handleHideShowFilter = function handleHideShowFilter() {
|
|
1674
1673
|
setShowFilter(!showFilter);
|