Skip to content

fix(MatPaginatorIntl): Provide a provider if exists. - #7895

Merged
andrewseguin merged 3 commits into
angular:masterfrom
Jefiozie:fix/PaginatorProvider
Nov 2, 2017
Merged

fix(MatPaginatorIntl): Provide a provider if exists.#7895
andrewseguin merged 3 commits into
angular:masterfrom
Jefiozie:fix/PaginatorProvider

Conversation

@Jefiozie

@JefiozieJefiozie commented Oct 19, 2017

Copy link
Copy Markdown
Contributor

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-intl
cc: @jelbourn
Closes#7344

If there is already a MatPaginatorIntl provider that one
If not create a new instance.
Closesangular#7344
@googlebotgooglebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Oct 19, 2017
@Jefiozie

Copy link
Copy Markdown
ContributorAuthor

@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

Copy link
Copy Markdown
ContributorAuthor

@andrewseguin or @jelbourn, Any idea when this pr will be reviewed? Happy to change things of needed.
Thanks.

Comment threadsrc/lib/paginator/paginator-intl.ts Outdated
}

/** @docs-private */
export function MAT_PAGINATOR_INTL_PROVIDER_FACTORY(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Omit space at beginning of import

@Jefiozie

Copy link
Copy Markdown
ContributorAuthor

@jelbourn just pushed a new commit with I believe the requested changes.

Comment threadsrc/lib/paginator/paginator-intl.ts Outdated

/** @docs-private */
export function MAT_PAGINATOR_INTL_PROVIDER_FACTORY(
export function parentIntl(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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();}

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay, will make the change, just to be sure with parentMatPaginatorIntl you mean the parentIntl argument correct?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also did you see my first comment, should pattern also be implemented for the sort-header-intl

@jelbournjelbourn left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jelbournjelbourn added pr: lgtm action: merge The PR is ready for merge by the caretaker labels Oct 23, 2017
@jelbourn

Copy link
Copy Markdown
Contributor

Feel free to send a similar PR for sorting

@andrewseguin
andrewseguin merged commit 9a05ecd into angular:masterNov 2, 2017
crisbeto added a commit to crisbeto/material2 that referenced this pull request Sep 1, 2018
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.
@angular-automatic-lock-bot

Copy link
Copy Markdown

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.

@angular-automatic-lock-botangular-automatic-lock-botBot locked and limited conversation to collaborators Sep 7, 2019
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: mergeThe PR is ready for merge by the caretakercla: yesPR author has agreed to Google's Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Paginator] Add app-wide configuration for MatPaginatorIntl

4 participants

@Jefiozie@jelbourn@googlebot@andrewseguin