diff --git a/src/components/Accordion.res b/src/components/Accordion.res index d5d1f00a7..c0418cb32 100644 --- a/src/components/Accordion.res +++ b/src/components/Accordion.res @@ -87,7 +87,7 @@ module AccordionInfo = { ) => { let (isExpanded, setIsExpanded) = React.useState(() => expanded) - let handleClick = _e => { + let handleClick = _ => { setIsExpanded(prevExpanded => !prevExpanded) } diff --git a/src/components/Calendar.res b/src/components/Calendar.res index e810efb39..d997c106d 100644 --- a/src/components/Calendar.res +++ b/src/components/Calendar.res @@ -116,7 +116,7 @@ module TableRow = { | None => true } - let onClick = _evt => { + let onClick = _ => { let isClickDisabled = (endDate->isEmptyString && !isInLimit) || (isFutureDate ? disableFutureDates : disablePastDates) || @@ -252,7 +252,7 @@ module TableRow = { className={classN} onClick onMouseOver={_ => handleHover()} - onMouseOut={_evt => setHoverdDate(_ => "")}> + onMouseOut={_ => setHoverdDate(_ => "")}> { let {globalUIConfig: {font: {textColor}}} = React.useContext(ThemeProvider.themeContext) - let onCardClick = _ev => { + let onCardClick = _ => { switch onRowClick { | Some(fn) => fn(rowIndex + offset) | None => () @@ -53,7 +53,7 @@ module CardDetails = { let (show, setshow) = React.useState(_ => true) - let showMore = _ev => { + let showMore = _ => { setshow(prev => !prev) } diff --git a/src/components/Chip.res b/src/components/Chip.res index c6b50b3b4..4b1c66bf2 100644 --- a/src/components/Chip.res +++ b/src/components/Chip.res @@ -4,7 +4,7 @@ let make = (~values=[], ~showButton=false, ~onButtonClick=_ => (), ~converterFn=
{values ->Array.map(value => { - let onClick = _evt => { + let onClick = _ => { onButtonClick(value) }
!p) }, ) - let changeVisibility = _ev => { + let changeVisibility = _ => { if !isDisabled { setIsExpanded(p => !p) } diff --git a/src/components/DateRangeField.res b/src/components/DateRangeField.res index d6b6d0863..4518cbd47 100644 --- a/src/components/DateRangeField.res +++ b/src/components/DateRangeField.res @@ -400,7 +400,7 @@ module Base = { changeStartDate(str, true, None) } - let handleApply = _ev => { + let handleApply = _ => { setShowOption(_ => false) setCalendarVisibility(p => !p) setIsDropdownExpanded(_ => false) @@ -440,7 +440,7 @@ module Base = { } let startTimeInput: ReactFinalForm.fieldRenderPropsInput = { name: "string", - onBlur: _ev => (), + onBlur: _ => (), onChange: timeValEv => { let startTimeVal = timeValEv->Identity.formReactEventToString let endTime = localEndDate->getTimeStringForValue(isoStringToCustomTimeZone) @@ -457,13 +457,13 @@ module Base = { } } }, - onFocus: _ev => (), + onFocus: _ => (), value: localStartDate->getTimeStringForValue(isoStringToCustomTimeZone)->JSON.Encode.string, checked: false, } let endTimeInput: ReactFinalForm.fieldRenderPropsInput = { name: "string", - onBlur: _ev => (), + onBlur: _ => (), onChange: timeValEv => { let endTimeVal = timeValEv->Identity.formReactEventToString let startTime = localStartDate->getTimeStringForValue(isoStringToCustomTimeZone) @@ -479,7 +479,7 @@ module Base = { } } }, - onFocus: _ev => (), + onFocus: _ => (), value: localEndDate->getTimeStringForValue(isoStringToCustomTimeZone)->JSON.Encode.string, checked: false, } diff --git a/src/components/DateRangePicker.res b/src/components/DateRangePicker.res index 227fc9725..70a32a6a4 100644 --- a/src/components/DateRangePicker.res +++ b/src/components/DateRangePicker.res @@ -403,7 +403,7 @@ module Base = { changeStartDate(str, true, None) } - let handleApply = _ev => { + let handleApply = _ => { setShowOption(_ => false) setCalendarVisibility(p => !p) setIsDropdownExpanded(_ => false) @@ -443,7 +443,7 @@ module Base = { } let startTimeInput: ReactFinalForm.fieldRenderPropsInput = { name: "string", - onBlur: _ev => (), + onBlur: _ => (), onChange: timeValEv => { let startTimeVal = timeValEv->Identity.formReactEventToString let endTime = localEndDate->getTimeStringForValue(isoStringToCustomTimeZone) @@ -460,13 +460,13 @@ module Base = { } } }, - onFocus: _ev => (), + onFocus: _ => (), value: localStartDate->getTimeStringForValue(isoStringToCustomTimeZone)->JSON.Encode.string, checked: false, } let endTimeInput: ReactFinalForm.fieldRenderPropsInput = { name: "string", - onBlur: _ev => (), + onBlur: _ => (), onChange: timeValEv => { let endTimeVal = timeValEv->Identity.formReactEventToString let startTime = localStartDate->getTimeStringForValue(isoStringToCustomTimeZone) @@ -482,7 +482,7 @@ module Base = { } } }, - onFocus: _ev => (), + onFocus: _ => (), value: localEndDate->getTimeStringForValue(isoStringToCustomTimeZone)->JSON.Encode.string, checked: false, } diff --git a/src/components/DynamicChart.res b/src/components/DynamicChart.res index 06e8848d2..313103c4f 100644 --- a/src/components/DynamicChart.res +++ b/src/components/DynamicChart.res @@ -324,7 +324,7 @@ module GranularitySelectBox = { open HeadlessUI <> - {_menuProps => + {_ =>
@@ -352,7 +352,7 @@ module GranularitySelectBox = { leaveTo="transform opacity-0 scale-95"> { - {_props => { + {_ => { <>
{options diff --git a/src/components/DynamicFilter.res b/src/components/DynamicFilter.res index f08056af7..929f361ad 100644 --- a/src/components/DynamicFilter.res +++ b/src/components/DynamicFilter.res @@ -189,7 +189,7 @@ let make = ( buttonSize=Small leftIcon={CustomIcon()} textStyle={`${textColor.primaryNormal}`} - onClick={_ev => setShowModal(_ => true)} + onClick={_ => setShowModal(_ => true)} />
{ + let handleClick = React.useCallback(_ => { handleSelectedTab( ~tabValue={ switch tabNames->Array.get(index) { @@ -171,7 +171,7 @@ module IndicationArrow = { let make = (~iconName, ~side, ~refElement: React.ref>, ~isVisible) => { let isMobileView = MatchMedia.useMobileChecker() let onClick = { - _ev => + _ => refElement.current ->Nullable.toOption ->Option.forEach(input => @@ -399,7 +399,7 @@ let make = ( let scrollRef = React.useRef(Nullable.null) let lastTabRef = React.useRef(Nullable.null) - let onScroll = _ev => { + let onScroll = _ => { setTabScroll( firstTabRef, lastTabRef, @@ -595,7 +595,7 @@ let make = ( buttonSize=Small customButtonStyle=addBtnStyle textStyle=addBtnTextStyle - onClick={_ev => setShowModal(_ => true)} + onClick={_ => setShowModal(_ => true)} />} toolTipPosition=Top tooltipWidthClass="w-fit" diff --git a/src/components/Filter.res b/src/components/Filter.res index 3655f41f3..8267a4f55 100644 --- a/src/components/Filter.res +++ b/src/components/Filter.res @@ -126,7 +126,7 @@ let make = ( ~path="", ~remoteFilters: array>, ~remoteOptions: array>, - ~localOptions as _: array>, + ~localOptions as _, ~localFilters: array>, ~mandatoryRemoteKeys=[], ~popupFilterFields: array>=[], diff --git a/src/components/FilterSelectBox.res b/src/components/FilterSelectBox.res index 59c8cc9e8..cd8cc1052 100644 --- a/src/components/FilterSelectBox.res +++ b/src/components/FilterSelectBox.res @@ -539,7 +539,7 @@ module BaseSelect = { setSearchString(_ => str) } - let selectAll = select => _ev => { + let selectAll = select => _ => { let newValues = if select { let newVal = filteredOptions @@ -901,7 +901,7 @@ module BaseSelectButton = { let (itemdata, setItemData) = React.useState(() => "") let (assignButtonState, setAssignButtonState) = React.useState(_ => false) let searchRef = React.useRef(Nullable.null) - let onItemClick = itemData => _ev => { + let onItemClick = itemData => _ => { if !disableSelect { let isSelected = value->JSON.Decode.string->Option.mapOr(false, str => itemData === str) @@ -1212,7 +1212,7 @@ module BaseRadio = { setSearchString(_ => "") }, ) - let onItemClick = (itemData, isDisabled) => _ev => { + let onItemClick = (itemData, isDisabled) => _ => { if !isDisabled { let isSelected = value->JSON.Decode.string->Option.mapOr(false, str => itemData === str) @@ -1612,7 +1612,7 @@ module BaseDropdown = { } } - let removeOption = text => _ev => { + let removeOption = text => _ => { let actualValue = switch Array.find(transformedOptions, option => option.value == text) { | Some(str) => str.value | None => "" @@ -1682,8 +1682,8 @@ module BaseDropdown = { | TopLeft | TopRight => "mb-12" } - let onRadioOptionSelect = _ev => { - newInputRadio.onChange(_ev) + let onRadioOptionSelect = ev => { + newInputRadio.onChange(ev) addButton ? setShowDropDown(_ => true) : setShowDropDown(_ => false) } diff --git a/src/components/HeadlessUISelectBox.res b/src/components/HeadlessUISelectBox.res index ae71801ac..17ba83c8c 100644 --- a/src/components/HeadlessUISelectBox.res +++ b/src/components/HeadlessUISelectBox.res @@ -38,9 +38,9 @@ let make = (
- {_menuProps => + {_ =>
- {_buttonProps => children} + {_ => children} - {_props => + {_ => options ->Array.mapWithIndex((option, index) => { let selected = switch value { @@ -137,7 +137,7 @@ let make = ( } else { - {_props => + {_ => options ->Array.mapWithIndex((option, index) => { let selected = switch value { diff --git a/src/components/InfraCalendar.res b/src/components/InfraCalendar.res index b1105f63c..576663111 100644 --- a/src/components/InfraCalendar.res +++ b/src/components/InfraCalendar.res @@ -68,7 +68,7 @@ module TableRow = { ) let isFutureDate = todayInitial -. date->Date.getTime < 0.0 - let onClick = _evt => { + let onClick = _ => { let isClickDisabled = isFutureDate ? disableFutureDates : disablePastDates switch !isClickDisabled { | true => diff --git a/src/components/InfraCalendarList.res b/src/components/InfraCalendarList.res index 096a8a7af..af2b28184 100644 --- a/src/components/InfraCalendarList.res +++ b/src/components/InfraCalendarList.res @@ -130,8 +130,8 @@ module MonthItem = { open InfraCalendar @react.component let make = ( - ~month as _: option=?, - ~year as _: option=?, + ~month as _, + ~year as _, ~onDateClick=?, ~cellHighlighter=?, ~cellRenderer=?, diff --git a/src/components/NewCalendar.res b/src/components/NewCalendar.res index 74b32e9fc..1506aecd2 100644 --- a/src/components/NewCalendar.res +++ b/src/components/NewCalendar.res @@ -97,7 +97,7 @@ module TableRow = { | None => true } - let onClick = _evt => { + let onClick = _ => { switch setIsDateClicked { | Some(setIsDateClicked) => setIsDateClicked(_ => true) | _ => () @@ -308,7 +308,7 @@ module TableRow = { className={`${classN} ${highlightBgClass} text-sm font-normal`} onClick onMouseOver={_ => handleHover()} - onMouseOut={_evt => setHoverdDate(_ => "")}> + onMouseOut={_ => setHoverdDate(_ => "")}> paginate(Math.Int.max(1, currentPage - 1))} + onClick={_ => paginate(Math.Int.max(1, currentPage - 1))} /> } else { paginate(Math.Int.max(1, currentPage - 1))} + onClick={_ => paginate(Math.Int.max(1, currentPage - 1))} /> }} {pageNumbers @@ -39,7 +39,7 @@ let make = (~resultsPerPage, ~totalResults, ~currentPage, ~paginate, ~btnCount=4
} @@ -101,7 +101,7 @@ module MenuOption = { {_popoverProps => <> - {_buttonProps => } + {_ => } {panelProps => {
(), + onBlur: _ => (), onChange: ev => { let value = ev->Identity.formReactEventToBool setIsFRMSettings(_ => value) }, - onFocus: _ev => (), + onFocus: _ => (), value: {isFRMSettings->JSON.Encode.bool}, checked: true, } diff --git a/src/screens/HSwitchRemoteFilter.res b/src/screens/HSwitchRemoteFilter.res index 9410a895b..066dc1fef 100644 --- a/src/screens/HSwitchRemoteFilter.res +++ b/src/screens/HSwitchRemoteFilter.res @@ -92,9 +92,9 @@ module SearchBarFilter = { let inputSearch: ReactFinalForm.fieldRenderPropsInput = { name: "name", - onBlur: _ev => (), + onBlur: _ => (), onChange, - onFocus: _ev => (), + onFocus: _ => (), value: baseValue->JSON.Encode.string, checked: true, } diff --git a/src/screens/Helpers/TableSearchFilter.res b/src/screens/Helpers/TableSearchFilter.res index f977d9eac..23dc6148d 100644 --- a/src/screens/Helpers/TableSearchFilter.res +++ b/src/screens/Helpers/TableSearchFilter.res @@ -24,9 +24,9 @@ let make = ( let inputSearch: ReactFinalForm.fieldRenderPropsInput = { name: "search", - onBlur: _ev => (), + onBlur: _ => (), onChange, - onFocus: _ev => (), + onFocus: _ => (), value: searchVal->JSON.Encode.string, checked: true, } diff --git a/src/screens/NewAnalytics/NewAnalyticsHelper.res b/src/screens/NewAnalytics/NewAnalyticsHelper.res index 5ab7bb840..c16d52468 100644 --- a/src/screens/NewAnalytics/NewAnalyticsHelper.res +++ b/src/screens/NewAnalytics/NewAnalyticsHelper.res @@ -57,11 +57,11 @@ module CustomDropDown = { open HeadlessUI let (arrow, setArrow) = React.useState(_ => false) - {_menuProps => + {_ =>
- {_buttonProps => { + {_ => { <> {buttonText->React.string} {_popoverProps => <> - {_buttonProps => } + {_ => } {panelProps => {
{ {if redirectToken->isNonEmptyString {