Skip to content

Commit 0e341e4

Browse files
committed
chore: refactoring
1 parent 8301cf7 commit 0e341e4

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/bottomsheet/bottomsheet-common.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,11 @@ export abstract class ViewWithBottomSheetBase extends View {
6767
protected abstract _showNativeBottomSheet(parent: View, options: BottomSheetOptions);
6868
protected _commonShowNativeBottomSheet(parent: View, options: BottomSheetOptions) {
6969
this._getRootModalViews().push(this);
70+
this.cssClasses.add(CSSUtils.MODAL_ROOT_VIEW_CSS_CLASS);
71+
const modalRootViewCssClasses = CSSUtils.getSystemCssClasses();
72+
modalRootViewCssClasses.forEach((c) => this.cssClasses.add(c));
73+
74+
// (parent as any)._modal = this;
7075
options.context = options.context || {};
7176
this._bottomSheetContext = options.context;
7277
this._onDismissBottomSheetCallback = (...originalArgs) => {
@@ -134,10 +139,6 @@ export abstract class ViewWithBottomSheetBase extends View {
134139
: (Builder.createViewFromEntry({
135140
moduleName: options.view as string,
136141
}) as ViewWithBottomSheetBase);
137-
view.cssClasses.add(CSSUtils.MODAL_ROOT_VIEW_CSS_CLASS);
138-
const modalRootViewCssClasses = CSSUtils.getSystemCssClasses();
139-
modalRootViewCssClasses.forEach((c) => view.cssClasses.add(c));
140-
141142
view._showNativeBottomSheet(this, options);
142143
return view;
143144
}

0 commit comments

Comments
 (0)