fix(ESF): move custom dialog out of ESF markup#17136
Conversation
| this._overlayService.opening.pipe(takeUntil(this.destroy$)).subscribe((args) => { | ||
| if (args.id === overlayId) { | ||
| customDialog.esf = this.esf; | ||
| customDialog.column = this.esf.column; | ||
| customDialog.filteringService = this.esf.grid.filteringService; | ||
| customDialog.overlayComponentId = overlayId; | ||
| customDialog.selectedOperator = eventArgs.newSelection.value; |
There was a problem hiding this comment.
I don't see a reason for the opening here, can we have mostly the same logic as before that just assigned the customDialog props
| modal: false, | ||
| closeOnOutsideClick: true, | ||
| positionStrategy: new ContainerPositionStrategy(), | ||
| scrollStrategy: new AbsoluteScrollStrategy() |
There was a problem hiding this comment.
This does.. nothing for container strategy?
| const overlayId = this._overlayService.attach(IgxExcelStyleCustomDialogComponent, this.esf.grid.viewRef, overlaySettings); | ||
| const overlayInfo = this._overlayService.getOverlayById(overlayId); | ||
| const customDialog = overlayInfo.componentRef.instance as IgxExcelStyleCustomDialogComponent; | ||
| this.esf.grid.tbody.nativeElement.appendChild(overlayInfo.wrapperElement.parentElement); |
There was a problem hiding this comment.
I know this is needed atm, but we could consider leaving the dialog on the grid container instead as well (separate from the PR);
…hub.com/IgniteUI/igniteui-angular into mvenkov/move-esf-dialog-out-of-dropdown
| if (this.esf.overlayComponentId) { | ||
| this.esf.hide(); | ||
| } | ||
| this.subMenu.close(); | ||
| this.customDialog.open(this.esf.mainDropdown.nativeElement); | ||
| this._overlayService.show(overlayId); |
There was a problem hiding this comment.
I know this PR merely moves things around to remove the outlet usage, but this component can really use some refactoring where the onSubMenuSelection is emitted upwards for the root ESF component to handle, close itself and spawn the dialog. And possibly some actual dialog and/or dialog ARIA would be nice. Just 2c
Right now the custom dialog shown in ESF is a child element of the
excel-style-conditional-filtercomponent. When custom dialog is shown its parent is closed. This makes the parent of the dialog invisible, marked withdisplay: none. This effectively hides and the dialog. To fix this custom dialog is now removed fromexcel-style-conditional-filtercomponent. Custom dialog is shown directly viaoverlayservice and is provided as component.Next step will be to remove the grid outlet used to show the custom dialog in the grid as this will not be needed anymore.
Closes #17039
Additional information (check all that apply):
Checklist:
feature/README.MDupdates for the feature docsREADME.MDCHANGELOG.MDupdates for newly added functionalityng updatemigrations for the breaking changes (migrations guidelines)