Reputation: 22408
I've used angular Dialog
with 6.2.1 materials version, it was OK.
I just updated to 6.3.0.
Now All of my Dialog
s are right align, not center !
What's wrong !
Update:
I found what causes this problem.
Whenever I set dir="rtl"
in html tag, problem occurred.
How can I fix it?
Upvotes: 1
Views: 4713
Reputation: 22408
I found the solution. We can resolve this problem as follows:
from https://material.angular.io/components/dialog/overview#specifying-global-configuration-defaults
Specifying global configuration defaults Default dialog options can be specified by providing an instance of MatDialogConfig for MAT_DIALOG_DEFAULT_OPTIONS in your application's root module.
@NgModule({
providers: [
{provide: MAT_DIALOG_DEFAULT_OPTIONS, useValue: {hasBackdrop: true, direction: 'ltr'}}
]
})
Notice to direction: 'ltr'
Upvotes: 4