Skip to content

Commit e8dc6fa

Browse files
committed
fix
1 parent 37c917c commit e8dc6fa

File tree

3 files changed

+21
-28
lines changed

3 files changed

+21
-28
lines changed

packages/devextreme-scss/scss/widgets/base/scheduler/_index.scss

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -469,28 +469,31 @@ $scheduler-appointment-form-label-padding: 20px;
469469
}
470470

471471
.dx-form {
472+
min-height: 100%;
472473
position: relative;
473474
overflow: hidden;
474475

475476
.dx-scheduler-form-main-group {
476477
transition: transform 0.3s ease-in-out;
477478
transform: translateX(0);
479+
position: relative;
478480

479-
&.dx-scheduler-form-main-hidden {
481+
&.dx-scheduler-form-main-group-hidden {
480482
transform: translateX(-100%);
483+
position: absolute;
484+
top: 0;
481485
}
482486
}
483487

484488
.dx-scheduler-form-recurrence-group {
485-
position: absolute;
486-
top: 0;
487-
left: 0;
488-
width: 100%;
489489
transition: transform 0.3s ease-in-out;
490-
transform: translateX(100%);
490+
transform: translateX(0);
491+
position: relative;
491492

492-
&:not(.dx-scheduler-form-recurrence-hidden) {
493-
transform: translateX(0);
493+
&.dx-scheduler-form-recurrence-group-hidden {
494+
transform: translateX(100%);
495+
position: absolute;
496+
top: 0;
494497
}
495498
}
496499

packages/devextreme/js/__internal/scheduler/appointment_popup/m_form.ts

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ const CLASSES = {
6161
descriptionEditor: 'dx-scheduler-form-description-editor',
6262

6363
recurrenceSettingsButton: 'dx-scheduler-form-recurrence-settings-button',
64-
mainHidden: 'dx-scheduler-form-main-hidden',
64+
mainHidden: 'dx-scheduler-form-main-group-hidden',
6565
recurrenceGroup: 'dx-scheduler-form-recurrence-group',
66-
recurrenceHidden: 'dx-scheduler-form-recurrence-hidden',
66+
recurrenceHidden: 'dx-scheduler-form-recurrence-group-hidden',
6767
};
6868

6969
const EDITOR_NAMES = {
@@ -130,6 +130,10 @@ export class AppointmentForm {
130130
return this._dxForm as dxForm;
131131
}
132132

133+
private get dxPopup(): Popup {
134+
return this._popup.dxPopup as Popup;
135+
}
136+
133137
get readOnly(): boolean {
134138
return this.dxForm.option('readOnly') as boolean;
135139
}
@@ -767,16 +771,9 @@ export class AppointmentForm {
767771
}
768772

769773
showRecurrenceGroup(): void {
770-
// TODO: make dxPopup a member of AppointmentForm class
771-
const $popup = $('.dx-popup.dx-widget.dx-scheduler-appointment-popup');
772-
const dxPopup = ($popup as any).dxPopup('instance') as Popup;
773-
774774
// @ts-expect-error
775-
dxPopup?.option('height', dxPopup.$overlayContent().height());
776-
777-
// TODO: move these styles to according CLASSES in scss file
778-
this._$mainGroup?.css('position', 'absolute');
779-
this._$recurrenceGroup?.css('position', 'relative');
775+
const overlayHeight = this.dxPopup.$overlayContent().height();
776+
this.dxPopup.option('height', overlayHeight);
780777

781778
this._$mainGroup?.addClass(CLASSES.mainHidden);
782779
this._$recurrenceGroup?.removeClass(CLASSES.recurrenceHidden);
@@ -793,15 +790,7 @@ export class AppointmentForm {
793790
}
794791

795792
showMainGroup(saveRecurrenceValue = true): void {
796-
// TODO: make dxPopup a member of AppointmentForm class
797-
const $popup = $('.dx-popup.dx-widget.dx-scheduler-appointment-popup');
798-
const dxPopup = ($popup as any).dxPopup('instance');
799-
800-
dxPopup?.option('height', undefined);
801-
802-
// TODO: move these styles to according CLASSES in scss file
803-
this._$mainGroup?.css('position', 'relative');
804-
this._$recurrenceGroup?.css('position', 'absolute');
793+
this.dxPopup.option('height', undefined);
805794

806795
this._$mainGroup?.removeClass(CLASSES.mainHidden);
807796
this._$recurrenceGroup?.addClass(CLASSES.recurrenceHidden);

packages/devextreme/js/__internal/scheduler/appointment_popup/m_popup.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ export class AppointmentPopup {
106106
},
107107
contentTemplate: (): dxElementWrapper => {
108108
this.form.create({
109+
dxPopup: this.popup,
109110
updateToolbarForMainGroup: (): void => this.updateToolbarForMainGroup(),
110111
updateToolbarForRecurrenceGroup: (): void => this.updateToolbarForRecurrenceGroup(),
111112
});

0 commit comments

Comments
 (0)