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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "willba-component-library",
3
- "version": "0.2.17",
3
+ "version": "0.2.19",
4
4
  "description": "A custom UI component library",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/index.esm.js",
@@ -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
- useEffect(() => {
31
- onSubmit(calendarRange)
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)