Feature request
I want MdDialogConfig to have option for panelClass to be an array of classes, like
panelClass: ['custom-container', 'widget-container']
Currently there could be only one panelClass per dialog
I want to add various classes depending on environment, but i have no such option and i have to include all possible combinations into separate classes
Should be able to do
panelClass: 'custom-container widget-container'
That said, I wish all the overlay class api's were NgClass-compatible
@willshowell I believe that is not possible, doing
let config = new MdDialogConfig();
config.panelClass = 'custom-container widget-container';
gives me next error:
ERROR DOMException: Failed to execute 'add' on 'DOMTokenList': The token provided ('custom-container widget-container') contains HTML space characters, which are not valid in tokens.
at OverlayRef.webpackJsonpac__name_.5.OverlayRef.attach (http://localhost:8080/site/vendor.bundle.js:51819:34)
at MdDialog.webpackJsonpac__name_.5.MdDialog._attachDialogContainer (http://localhost:8080/site/vendor.bundle.js:67867:53)
at MdDialog.webpackJsonpac__name_.5.MdDialog.open (http://localhost:8080/site/vendor.bundle.js:67809:53)
etc.
Oh yeah, you're right. Maybe some combination of this with an isArray check would do it
- this._pane.classList.add(this._state.panelClass);
+ this._pane.classList.add(...this._state.panelClass);
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
_This action has been performed automatically by a bot._
Most helpful comment
@willshowell I believe that is not possible, doing
gives me next error:
etc.