Skip to content

Commit cc1075a

Browse files
committed
fix: add 'preset-click' operation type to RangePicker
1 parent d3dc263 commit cc1075a

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/PickerInput/RangePicker.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -495,6 +495,7 @@ function RangePicker<DateType extends object = any>(
495495
const passed = triggerSubmitChange(nextValues);
496496

497497
if (passed) {
498+
lastOperation('preset-click');
498499
triggerOpen(false, { force: true });
499500
}
500501
};

src/PickerInput/hooks/useRangeActive.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import * as React from 'react';
22
import type { RangeValueType } from '../RangePicker';
33
import useLockEffect from './useLockEffect';
44

5-
export type OperationType = 'input' | 'panel';
5+
export type OperationType = 'input' | 'panel' | 'preset-click';
66

77
export type NextActive<DateType> = (nextValue: RangeValueType<DateType>) => number | null;
88

0 commit comments

Comments
 (0)