Skip to content

Commit

Permalink
feat(kit): TuiCalendarRange add item property for correctly switc…
Browse files Browse the repository at this point in the history
…h value outside
  • Loading branch information
zhd-dm committed Aug 19, 2024
1 parent 84553ac commit 558c936
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export class TuiCalendarRangeComponent
implements OnChanges, TuiWithOptionalMinMax<TuiDay>
{
/**
* @deprecated use `selectedItem`
* @deprecated use `item`
*/
private selectedPeriod: TuiDayRangePeriod | null = null;

Expand Down Expand Up @@ -87,7 +87,6 @@ export class TuiCalendarRangeComponent
@Input()
set item(item: TuiDayRangePeriod | null) {
this.updateValue(item?.range ?? null);
this.selectedItem = item;
}

@Output()
Expand All @@ -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;

Expand All @@ -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;
Expand Down

0 comments on commit 558c936

Please sign in to comment.