From cc1075ab1ddd6fbe571081b1c057bc870c6df5cb Mon Sep 17 00:00:00 2001 From: zhengjihao <2714499297@qq.com> Date: Tue, 22 Jul 2025 18:21:32 +0800 Subject: [PATCH] fix: add 'preset-click' operation type to RangePicker --- src/PickerInput/RangePicker.tsx | 1 + src/PickerInput/hooks/useRangeActive.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) 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;