diff --git a/src/PickerInput/RangePicker.tsx b/src/PickerInput/RangePicker.tsx index 7a0b57839..2766511a9 100644 --- a/src/PickerInput/RangePicker.tsx +++ b/src/PickerInput/RangePicker.tsx @@ -495,6 +495,7 @@ function RangePicker( const passed = triggerSubmitChange(nextValues); if (passed) { + lastOperation('preset-click'); triggerOpen(false, { force: true }); } }; diff --git a/src/PickerInput/hooks/useRangeActive.ts b/src/PickerInput/hooks/useRangeActive.ts index 6eec27467..4b75d8d58 100644 --- a/src/PickerInput/hooks/useRangeActive.ts +++ b/src/PickerInput/hooks/useRangeActive.ts @@ -2,7 +2,7 @@ import * as React from 'react'; import type { RangeValueType } from '../RangePicker'; import useLockEffect from './useLockEffect'; -export type OperationType = 'input' | 'panel'; +export type OperationType = 'input' | 'panel' | 'preset-click'; export type NextActive = (nextValue: RangeValueType) => number | null;