@colisweb/rescript-toolkit 4.14.12 → 4.14.14
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/.secure_files/ci-functions-v17.5.3 +2603 -0
- package/.secure_files/ci-functions-v17.5.4 +2603 -0
- package/.secure_files/ci-functions-v17.6.0 +2603 -0
- package/.secure_files/ci-functions-v17.6.1 +2603 -0
- package/.secure_files/ci-functions-v17.6.2 +2603 -0
- package/package.json +1 -1
- package/src/ui/Toolkit__Ui_Table.res +1 -1
- package/src/vendors/ReactDayPicker.res +10 -9
package/package.json
CHANGED
|
@@ -63,7 +63,7 @@ module Core = {
|
|
|
63
63
|
? <Toolkit__Ui_Spread
|
|
64
64
|
key={"thead-th" ++ index->Int.toString} props={column.getHeaderProps()}>
|
|
65
65
|
<td
|
|
66
|
-
className="px-2 pt-2 border-b border-r border-gray-300 xl:h-
|
|
66
|
+
className="px-2 pt-2 border-b border-r border-gray-300 xl:min-h-[5rem]"
|
|
67
67
|
key={"thead-thd" ++ index->Int.toString}>
|
|
68
68
|
<Toolkit__Ui_Spread props={column.getSortByToggleProps()}>
|
|
69
69
|
<div
|
|
@@ -356,7 +356,7 @@ module RangeDayPickerInput = {
|
|
|
356
356
|
~modifiersClassNames: modifiersClassNames=?,
|
|
357
357
|
~defaultMonth: Js.Date.t=?,
|
|
358
358
|
) => {
|
|
359
|
-
let
|
|
359
|
+
let previousValue = Toolkit__Hooks.usePrevious(value)
|
|
360
360
|
|
|
361
361
|
let (state, dispatch) = ReactUpdate.useReducerWithMapState(
|
|
362
362
|
(state, action) =>
|
|
@@ -457,7 +457,9 @@ module RangeDayPickerInput = {
|
|
|
457
457
|
dropdownClassName
|
|
458
458
|
buttonClassName={cx(["min-w-[100px] h-[38px]", buttonClassName])}
|
|
459
459
|
label={<div className={cx(["absolute", labelClassName])}>
|
|
460
|
-
{
|
|
460
|
+
{previousValue
|
|
461
|
+
->Option.flatMap(v => v)
|
|
462
|
+
->Option.mapWithDefault(
|
|
461
463
|
placeholder->Option.getWithDefault("-"->React.string),
|
|
462
464
|
labelFormatter,
|
|
463
465
|
)}
|
|
@@ -579,7 +581,6 @@ module RangeDayPickerInput = {
|
|
|
579
581
|
? <Toolkit__Ui_Button
|
|
580
582
|
onClick={_ => {
|
|
581
583
|
dispatch(ResetRange)
|
|
582
|
-
setValidatedRange(_ => None)
|
|
583
584
|
onChange(None)
|
|
584
585
|
disclosure.hide()
|
|
585
586
|
}}>
|
|
@@ -588,19 +589,19 @@ module RangeDayPickerInput = {
|
|
|
588
589
|
: React.null}
|
|
589
590
|
<Toolkit__Ui_Button
|
|
590
591
|
onClick={_ => {
|
|
591
|
-
dispatch(UpdateRange(validatedRange))
|
|
592
592
|
disclosure.hide()
|
|
593
593
|
}}>
|
|
594
594
|
<ReactIntl.FormattedMessage defaultMessage="Annuler" />
|
|
595
595
|
</Toolkit__Ui_Button>
|
|
596
596
|
<Toolkit__Ui_Button
|
|
597
597
|
color=#success
|
|
598
|
-
disabled={
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
598
|
+
disabled={switch state.range {
|
|
599
|
+
| _ if allowEmpty => false
|
|
600
|
+
| Some({from: ?None})
|
|
601
|
+
| Some({to: ?None}) => true
|
|
602
|
+
| _ => false
|
|
603
|
+
}}
|
|
602
604
|
onClick={_ => {
|
|
603
|
-
setValidatedRange(_ => state.range)
|
|
604
605
|
onChange(state.range)
|
|
605
606
|
disclosure.hide()
|
|
606
607
|
}}>
|