From 558c936cb105b07ce4ff0a2d3693363d67ef4e92 Mon Sep 17 00:00:00 2001 From: Demyan Date: Mon, 19 Aug 2024 12:55:02 +0300 Subject: [PATCH] feat(kit): `TuiCalendarRange` add `item` property for correctly switch value outside --- .../components/calendar-range/calendar-range.component.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/projects/kit/components/calendar-range/calendar-range.component.ts b/projects/kit/components/calendar-range/calendar-range.component.ts index c256224ffba7..33b51aa910e4 100644 --- a/projects/kit/components/calendar-range/calendar-range.component.ts +++ b/projects/kit/components/calendar-range/calendar-range.component.ts @@ -53,7 +53,7 @@ export class TuiCalendarRangeComponent implements OnChanges, TuiWithOptionalMinMax { /** - * @deprecated use `selectedItem` + * @deprecated use `item` */ private selectedPeriod: TuiDayRangePeriod | null = null; @@ -87,7 +87,6 @@ export class TuiCalendarRangeComponent @Input() set item(item: TuiDayRangePeriod | null) { this.updateValue(item?.range ?? null); - this.selectedItem = item; } @Output() @@ -98,7 +97,6 @@ export class TuiCalendarRangeComponent availableRange: TuiDayRange | null = null; previousValue: TuiDayRange | null = null; - selectedItem: TuiDayRangePeriod | null = null; readonly maxLengthMapper = MAX_DAY_RANGE_LENGTH_MAPPER; @@ -111,14 +109,14 @@ export class TuiCalendarRangeComponent } /** - * @deprecated use `selectedItem` + * @deprecated use `item` */ get selectedActivePeriod(): TuiDayRangePeriod | null { return this.selectedPeriod; } /** - * @deprecated use `selectedItem` + * @deprecated use `item` */ set selectedActivePeriod(period: TuiDayRangePeriod | null) { this.selectedPeriod = period;