Skip to content

Commit 3afa103

Browse files
authored
fix: add 'preset-click' operation type to RangePicker (#933)
1 parent 8d7f30d commit 3afa103

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
@@ -501,6 +501,7 @@ function RangePicker<DateType extends object = any>(
501501
const passed = triggerSubmitChange(nextValues);
502502

503503
if (passed) {
504+
lastOperation('preset-click');
504505
triggerOpen(false, { force: true });
505506
}
506507
};

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)