willba-component-library 0.2.17 → 0.2.19
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/index.esm.js +5 -4
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +5 -4
- package/lib/index.js.map +1 -1
- package/lib/index.umd.js +5 -4
- package/lib/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/components/FilterCalendar/FilterCalendar.stories.tsx +1 -1
- package/src/components/FilterCalendar/FilterCalendar.tsx +1 -1
- package/src/components/FilterCalendar/hooks/useFilterCalendar.ts +4 -3
package/package.json
CHANGED
|
@@ -879,7 +879,7 @@ export const Primary: Story = {
|
|
|
879
879
|
},
|
|
880
880
|
loadingData: true,
|
|
881
881
|
toggleCalendar: true,
|
|
882
|
-
onSubmit: (val) => console.log(val),
|
|
882
|
+
onSubmit: (val) => console.log('Submit', val),
|
|
883
883
|
setToggleCalendar: (val) => console.log(val),
|
|
884
884
|
requestDates: (val) => console.log(val),
|
|
885
885
|
},
|
|
@@ -110,7 +110,7 @@ export default function FilterCalendar({
|
|
|
110
110
|
label={t(`common:clearDates`)}
|
|
111
111
|
/>
|
|
112
112
|
<SubmitButton
|
|
113
|
-
onClick={handleSubmit}
|
|
113
|
+
onClick={() => handleSubmit()}
|
|
114
114
|
label={t(`common:apply`)}
|
|
115
115
|
disabled={!calendarRange?.from || !calendarRange?.to}
|
|
116
116
|
/>
|
|
@@ -27,9 +27,10 @@ export const useFilterCalendar = ({ onSubmit, setToggleCalendar }: Props) => {
|
|
|
27
27
|
}
|
|
28
28
|
}, [])
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
// TODO - handle the onSubmit on calendar open
|
|
31
|
+
// useEffect(() => {
|
|
32
|
+
// onSubmit(calendarRange)
|
|
33
|
+
// }, [])
|
|
33
34
|
|
|
34
35
|
const handleSubmit = () => {
|
|
35
36
|
setToggleCalendar(false)
|