Uh oh!
There was an error while loading. Please reload this page.
fix(MatPaginatorIntl): Provide a provider if exists. - #7895
Conversation
If there is already a MatPaginatorIntl provider that one If not create a new instance. Closesangular#7344
Jefiozie
commented
Oct 19, 2017
@andrewseguin the screenshot test failed but it looks like it is different because of the focus on the input. Don't know if I did this but I don't see how. |
Jefiozie
commented
Oct 23, 2017
@andrewseguin or @jelbourn, Any idea when this pr will be reviewed? Happy to change things of needed. |
| } | ||
| /** @docs-private */ | ||
| export function MAT_PAGINATOR_INTL_PROVIDER_FACTORY( |
There was a problem hiding this comment.
You can just call the arg parentIntl
| import {MatTooltipModule} from '@angular/material/tooltip'; | ||
| import {MatPaginator} from './paginator'; | ||
| import {MatPaginatorIntl} from './paginator-intl'; | ||
| import { MAT_PAGINATOR_INTL_PROVIDER} from './paginator-intl'; |
There was a problem hiding this comment.
Omit space at beginning of import
Jefiozie
commented
Oct 23, 2017
@jelbourn just pushed a new commit with I believe the requested changes. |
| /** @docs-private */ | ||
| export function MAT_PAGINATOR_INTL_PROVIDER_FACTORY( | ||
| export function parentIntl( |
There was a problem hiding this comment.
Sorry, I wasn't totally clear. I meant the argument to the function (so that it fits on one line):
exportfunctionMAT_PAGINATOR_INTL_PROVIDER_FACTORY(parentIntl: MatPaginatorIntl){returnparentMatPaginatorIntl||newMatPaginatorIntl();}There was a problem hiding this comment.
okay, will make the change, just to be sure with parentMatPaginatorIntl you mean the parentIntl argument correct?
There was a problem hiding this comment.
Also did you see my first comment, should pattern also be implemented for the sort-header-intl
jelbourn
commented
Oct 23, 2017
Feel free to send a similar PR for sorting |
Along the same lines as angular#7988 and angular#7895. Fixes the consumer-provided `MatStepperIntl` instance not being picked up inside lazy-loaded modules. Fixesangular#12904.
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
If there is already a MatPaginatorIntl provider that one. If not create a new instance.
@andrewseguin I hope this is the correct implementation. If not let me know I will change it.
Next to this shouldn't this also be implemented for
sort-header-intlcc: @jelbourn
Closes#7344