willba-component-library 0.1.49 → 0.1.51
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.
- package/lib/components/FilterBar/FilterBar.d.ts +1 -1
- package/lib/components/FilterBar/hooks/useFilterBar.d.ts +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.esm.js +1 -0
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/index.umd.js +1 -0
- package/lib/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/components/FilterBar/FilterBar.stories.tsx +4 -1
- package/src/components/FilterBar/FilterBar.tsx +1 -1
- package/src/components/FilterBar/hooks/useFilterBar.tsx +2 -2
|
@@ -10,6 +10,6 @@ export type FilterBarProps = {
|
|
|
10
10
|
redirectUrl?: string;
|
|
11
11
|
palette?: Palette;
|
|
12
12
|
currentViewApply?: string;
|
|
13
|
-
onSubmit?: (val: Filters) => void;
|
|
13
|
+
onSubmit?: ((val: Filters) => void) | null;
|
|
14
14
|
};
|
|
15
15
|
export default function FilterBar({ language, ageCategories, redirectUrl, palette, currentViewApply, onSubmit, }: FilterBarProps): React.JSX.Element;
|
|
@@ -5,7 +5,7 @@ type Props = {
|
|
|
5
5
|
redirectUrl?: string;
|
|
6
6
|
currentViewApply?: string;
|
|
7
7
|
ageCategories?: AgeCategoryType[];
|
|
8
|
-
onSubmit?: (val: Filters) => void;
|
|
8
|
+
onSubmit?: ((val: Filters) => void) | null;
|
|
9
9
|
};
|
|
10
10
|
export declare const useFilterBar: ({ redirectUrl, currentViewApply, ageCategories, onSubmit, }: Props) => {
|
|
11
11
|
selectedFilter: string | boolean;
|
package/lib/index.d.ts
CHANGED
|
@@ -49,7 +49,7 @@ type FilterBarProps = {
|
|
|
49
49
|
redirectUrl?: string;
|
|
50
50
|
palette?: Palette;
|
|
51
51
|
currentViewApply?: string;
|
|
52
|
-
onSubmit?: (val: Filters) => void;
|
|
52
|
+
onSubmit?: ((val: Filters) => void) | null;
|
|
53
53
|
};
|
|
54
54
|
declare function FilterBar({ language, ageCategories, redirectUrl, palette, currentViewApply, onSubmit, }: FilterBarProps): React.JSX.Element;
|
|
55
55
|
|
package/lib/index.esm.js
CHANGED
|
@@ -4041,6 +4041,7 @@ var useFilterBar = function (_a) {
|
|
|
4041
4041
|
finally { if (e_3) throw e_3.error; }
|
|
4042
4042
|
}
|
|
4043
4043
|
handleSelectedFilter(false);
|
|
4044
|
+
console.log(onSubmit ? 'eeee' : 'tttt');
|
|
4044
4045
|
return onSubmit
|
|
4045
4046
|
? onSubmit(newParams)
|
|
4046
4047
|
: (window.location.href = "".concat(redirectUrl, "/").concat(selectedPath).concat(querySearchParams ? "?".concat(querySearchParams.toString()) : ''));
|