File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
src/material-experimental/mdc-progress-bar Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -199,7 +199,14 @@ export class MatProgressBar extends _MatProgressBarMixinBase implements AfterVie
199
199
const direction = this . _dir ? this . _dir . value : 'ltr' ;
200
200
const mode = this . mode ;
201
201
202
- foundation . setReverse ( direction === 'rtl' ? mode !== 'query' : mode === 'query' ) ;
202
+ const reverse = direction === 'rtl' ? mode !== 'query' : mode === 'query' ;
203
+ const progressDirection = reverse ? 'rtl' : 'ltr' ;
204
+ const currentDirection = this . _rootElement . getAttribute ( 'dir' ) ;
205
+ if ( currentDirection !== progressDirection ) {
206
+ this . _rootElement . setAttribute ( 'dir' , progressDirection ) ;
207
+ foundation . restartAnimation ( ) ;
208
+ }
209
+
203
210
foundation . setDeterminate ( mode !== 'indeterminate' && mode !== 'query' ) ;
204
211
205
212
// Divide by 100 because MDC deals with values between 0 and 1.
You can’t perform that action at this time.
0 commit comments