Skip to content

Commit

Permalink
fix(date-input): rename overflow inputs and set them to boolean attri…
Browse files Browse the repository at this point in the history
…butes
  • Loading branch information
Supamiu committed Dec 12, 2024
1 parent ce39482 commit 960617f
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions packages/ng/date2/date-input/date-input.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@
</div>
<div class="calendarWrapper-content" tabindex="-1">
<lu-calendar2
[enableOverflow]="enableOverflow()"
[showOverflow]="showOverflow()"
[enableOverflow]="!disableOverflow()"
[showOverflow]="!hideOverflow()"
[hideToday]="hideToday()"
[hasTodayButton]="hasTodayButton()"
[date]="currentDate()"
Expand Down
6 changes: 3 additions & 3 deletions packages/ng/date2/date-input/date-input.component.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ConnectionPositionPair } from '@angular/cdk/overlay';
import { ChangeDetectionStrategy, Component, computed, effect, ElementRef, forwardRef, inject, input, signal, untracked, viewChild, ViewEncapsulation } from '@angular/core';
import { booleanAttribute, ChangeDetectionStrategy, Component, computed, effect, ElementRef, forwardRef, inject, input, signal, untracked, viewChild, ViewEncapsulation } from '@angular/core';
import { AbstractControl, ControlValueAccessor, NG_VALIDATORS, NG_VALUE_ACCESSOR, ValidationErrors, Validator } from '@angular/forms';
import { LuClass, ɵeffectWithDeps } from '@lucca-front/ng/core';
import { InputDirective } from '@lucca-front/ng/form-field';
Expand Down Expand Up @@ -45,8 +45,8 @@ export class DateInputComponent extends AbstractDateComponent implements Control

placeholder = input<string>();

enableOverflow = input<boolean>(true);
showOverflow = input<boolean>(true);
disableOverflow = input(false, { transform: booleanAttribute });
hideOverflow = input(false, { transform: booleanAttribute });

popoverPositions: ConnectionPositionPair[] = [
new ConnectionPositionPair({ originX: 'start', originY: 'bottom' }, { overlayX: 'start', overlayY: 'top' }, -8, 0),
Expand Down
4 changes: 2 additions & 2 deletions stories/documentation/forms/date2/date-input.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ export default {

export const Basic: StoryObj<DateInputComponent> = {
args: {
enableOverflow: false,
showOverflow: false,
disableOverflow: false,
hideOverflow: false,
hideToday: false,
hideWeekend: false,
clearable: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ export default {
hasTodayButton: {
control: 'boolean',
},
disableOverflow: {
enableOverflow: {
control: 'boolean',
description: 'Autorise la sélection des jours du mois précédent ou suivant sur la vue du mois en cours.',
},
hideOverflow: {
showOverflow: {
control: 'boolean',
description: 'Affiche la sélection des jours du mois précédent ou suivant sur la vue du mois en cours.',
},
Expand Down Expand Up @@ -84,8 +84,8 @@ export const Basic: StoryObj<DateInputComponent & FormFieldComponent> = {
inlineMessage: 'Helper Text',
inlineMessageState: 'default',
// DateInput
enableOverflow: false,
showOverflow: false,
disableOverflow: false,
hideOverflow: false,
hideToday: false,
hasTodayButton: false,
hideWeekend: false,
Expand Down

0 comments on commit 960617f

Please sign in to comment.