Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
  • Jun 18 2019 18:50
    @StephenFluin banned @piotr-mamenas
Hi, I have observed a duplicate stepper component, after submitting my request and getting back response. Did anyone observe this?
1 reply
top one was the original, and the bottom one appears for a second or two, before it disappears
Yaakov Chaikin
Anyone know if there is a way to have a fixed option in a mat-autocomplete component, i.e., where the fixed option is always shown at the bottom of the autocomplete dropdown while the rest of the options are scrollable?
Samuel Hinkhouse
Hi y'all, in previous versions of Angular Material, there used to be a way to get the background color from some of the SCSS mixins. What is the current way to do this with Angular 12+?
How can I change the app's background color?
I would like to do something similar to what the basil example has.
Krzysztof Miąsko

Hi there. I've problem with cdkScrollable wrapped in element with ViewEncapsulation.ShadowDom


Maybe someone can help me.

Alexis Georges

Hey everyone,
I'm having troubles since NG 12 with theming.
I get following error:

SassError: Undefined function.
79 │   $typography-config: mat.mat-define-typography-config(

My code contains this

@use "~@angular/material/theming" as mat;
$typography-config: mat.mat-define-typography-config(
  // ...

The code is loaded thanks to @use through this way

  1. "styles.scss" loads @use "theme.scss"
  2. "theme.scss" loads @use "~myLibrary/typography.scss"

Could someone help me on this? :blush:

The error happens when I try to load anything from mat. inside my library:

  • mat.$grey-palette
  • mat.$dark-primary-text
  • ...
Milan Milanov

Hi Angular team. I've stumbled upon a requirement to implement a virtual scrolling strategy for items with different, but fixed heights. I've explained that in a comment in a github issue, as well as this SO question. I've modified the code suggested in the latter question and it seems to work. Two followup questions:

1) Do you think the use case is generic enough so that i try to create a PR in the experimental cdk, and eventually this becomes an official virtual scrolling strategy? If not, it can be published as a standalone npm module.
2) Is there a set of tests that are meant for different scrolling strategies, something like acceptance tests that cover basic functionality? I attempted to reuse the ones for the fixed strategy, but they also include template cache/track by/etc tests.

David Smith

Hi all. It looks like the changes to material 12 needed to support N number of palettes in a theme is pretty small. Mainly just storing the palettes or palette keys in a location where they can easily be accessed (the root and color locations cant be used to determine the keys since they contain other information aside from palettes), and changing the component themes to something like:

@each $palette-key in $palettes {
    $palette: map.get($theme, $palette-key);

    &.mat-#{$palette-key} .mat-button-focus-overlay {
      background-color: theming.get-color-from-palette($palette);

where the palettes can be iterated over instead of having hard-coded values assigned to primary/accent/warn, etc. I've actually already gone through the code and made these changes and didn't run across any cases the above wouldnt work. Wondering what people's thoughts are on this as I know there has been a big desire from the community for support for additional palettes in a theme, including from projects where I work.


Hi everyone, I'm facing a problem.
I'm showing mat dialog based on the clicked element position. Some time dialog part hiding behind the viewport ca't see the rest of the part.

How can i move/change dialog position ? is it possible ?

Sargo Darya
Hey folks, I have a question regarding drag/drop. I need to establish drag/drop of items across multiple components of which I do not know drop list ids. Is this even possible with the CDK drag/drop implementation? Thought the cdkDropListGroup would help but afaik it doesn't cross component bounds.
Robert Marcano
Greetings. Can a custom MatFormFieldControl add its own errors to the form field parent? MatFormFieldControl has errorState: boolean as a member, but I don't find a way to tell which ValidationErrors are present inside the field
Glauber Funez
Hi, I'm new around here.
could someone help me with this angular/components#23478
I've tried everything, based on what I found on the internet
oi @glauberfunez_twitter I think it can be normal, as 0 might be an invalid date based on your validation. There are ways around it, like using updateOn: 'blur' that might just solve your issue.

and about your locale date wish, you can set the date locale in the module that use the mat-datepicker. Checkout https://material.angular.io/components/datepicker/overview#setting-the-locale-code

Note you have to do it for all the modules that use it

Is it possible to use "mat-date-range-input" as inline element?
Jeremy Kepf

For MatSelect, the overlayDir is now private. Does anyone know how I can access it now? In node_modules MatSelect select.d.ts line 171, it's now:

/* Overlay pane containing the options. /
protected _overlayDir: CdkConnectedOverlay;

But it used to be:

 * Overlay pane containing the options.
 * @deprecated To be turned into a private API.
 * @breaking-change 10.0.0
 * @docs-private
overlayDir: CdkConnectedOverlay;
Hi everyone, I have this simple example of the material drag & drop functionality. I am trying to figure a way to programmatically move any of the items to the bottom on click. Any ideas? https://stackblitz.com/angular/mjqyyqxnqbo?file=app%2Fcdk-drag-drop-sorting-example.html
are peerDependencies required? just running npm i installs a lot of stuff that are peerDependencies but I don't even need a fraction of those
or can I disable a11y of cdk somehow completly? I don't need it at all but it is a pretty big part of my bundle size (at least according to webpack bundle analyzer)
Umer Naeem
hey there!! Guys I am new to open source I need your help in PR
i am getting api_golden_checks failed
Umer Naeem
anyone available to help
Pravin Ambekar
Hello Geeks,
Could you please help with this issue : https://stackoverflow.com/questions/69717559/how-to-generate-and-display-nested-angular-material-table-dynamically
I am unable to find solution to dynamically bind nested mat table having unpredictable no of child elements

Hi guys. I am looking for a way to using Angular Materials drag and drop to swap elements between lists rather than just moving them. That is I have been able to make it work functionally so that elements are swapped / replaced, however, visually when I drag a list item on top of another list item the preview is not correct and shows it as if you are dropping the item in between the items in the target list rather than replacing the item in the list. There are several open issues and questions about this and none of them seems to have been answered which is not encouraging. So my question for you is if this is at all achievable with Angular Materials or do I need to take another approach? It would be weird if it is no way to implement this drag-and-drop behavior as it seems quite a commonplace operation one would want.


Peter G Jones
Hi all. I have a problem with MatSelect. When opened, the current selection is not highlighted and the user has to scroll to see the highlighted/selected value. Also using matNativeControl seems better but looks ugly - not like material at all like it does with all the examples Ive seen. Something it fecked up. Anyone else seen this?
Hi, I have situation here like the material styling was overriding from embed application to normal angular application, Actually I'm embedding an custom element ( more like an application) into another angular application.
Do anyone faced this kind issue while embedding an application into another application
Also I have tried using the encapsulation modes but nothing helps me out
Maciej Maciaszek
Hi all, I'm struggling with setting first day of week in datepicker that is used in lazyloaded module. I provide everything that's needed in this module: { provide: MAT_DATE_LOCALE, useValue: "de-DE" }, { provide: LOCALE_ID, useValue: "de-DE" }, { provide: MAT_DATE_FORMATS, useValue: MAT_MOMENT_DATE_FORMATS },, and using DateAdapter.setLocale("de") in one of components that is using mat-datepicker in this module but with no luck. Day names are translated but Sunday is till first day of a week. Do you have a clue?
Oh, gosh. I just found out that i need to import MatMomentDateModule,
this one is a pain innit ?
Yaakov Chaikin
I built a custom MatFormFieldControl so it implements that interface. I already have a custom ErrorStateMatcher in my app. Currently, I have a very similar logic that exists in my custom ErrorStateMatcher in the ngDoCheck() where it updates the errorState of the control. Is there any way to associate the custom ErrorStateMatcher with my control or at least re-use it? I can't seem to find it how to integrate the 2 together.
Roman Danyliv
hi, draganddrop sdk is there a way to prevent deleting item from it's container until we drop it in another?
how to use style file like _button-base.import.scss,I want to change button line-height but $line-height property write in this file and can't change?
builtin style can't change......
Robin (Robert) Thomas

I'm trying to yarn test form-field prior to submitting a PR, but it throws:

ERROR: no such target '//src/material/form-field:unit_tests_chromium': target 'unit_tests_chromium' not declared in package 'src/material/form-field'

Am I missing a dependency?

Incidentally the @angular/components docs reference an @angular/components gitter, but the link 404s: https://github.com/angular/components/blob/master/CONTRIBUTING.md#-got-a-question-or-problem
Aman Agnihotri

typeError: _angular_coreWEBPACK_IMPORTED_MODULE_0.ɵnov(...).modules is not a function

getting this error while typing in any input field. it is hangs the application also. is there any idea guys about it ?

Mohamed Dhaker Abdeljawed
Hello, Any recommendations for a tree view lib for ngx ?

Hi everybody. Is it possible to deliberately assign an invalid string as the datepicker control value? My use case: Populate a form with pre-existing user data, point out any errors and allow them to resume editing from where they have left off.

The component seems to discard values if assigned via the value setter, if it can't create a valid Date object. In my case this would mean that the user would not be able to see where exactly they made a mistake.

I got this to work by for now by accessing the underlying native element, which is obviously less than ideal.

Domagoj Bazina

Hello everyone :)
I've created overlay in my Angular app using Portal host and Portal template (Described in this article, https://blog.thoughtram.io/angular/2017/11/20/custom-overlays-with-angulars-cdk.html). Stackblitz example: https://custom-overlay-step-5.stackblitz.io/
I'm wondering is there any way to define location of Portal host in DOM? As I can see, overlay is always positioned at the bottom of the body (last element of the body).

So I wolud like to move this "placeholder"/Portal host somewhere else in the DOM. Is this possible? Thanks in advance :)

Aman Agnihotri
ERROR TypeError: _angular_core__WEBPACK_IMPORTED_MODULE_0__nov(...).modules is not a function
    at Object.handleEvent (oidstfrppopup.component.html:14:87)
    at handleEvent (core.js:31595:1)
    at callWithDebugContext (core.js:32634:1)
    at Object.debugHandleEvent [as handleEvent] (core.js:32401:1)
    at dispatchEvent (core.js:23567:1)
    at core.js:30800:1
    at platform-browser.js:579:1
    at _ZoneDelegate.invokeTask (zone-evergreen.js:406:1)
    at Object.onInvokeTask (core.js:28567:1)
    at _ZoneDelegate.invokeTask (zone-evergreen.js:405:1)
this is coming in every key press in material input fields.
Can anyone help me on that ?
Hello, I am currently trying to use mat-checkbox together with shift to multiselect. but whenever I have the shift key pressed, the changed event does not get fired
  shiftdown(e: Event) {
    this.shiftstate = true;

  shiftup() {
    this.shiftstate = false;

  change(event: MatCheckboxChange, index: number) {
    if (this.lastclicked >= 0 && this.shiftstate) {
      let [min, max] = [this.lastclicked, index].sort((l, r) => l - r);
      for (let i = min; i++; i <= max) {
        this.userlist[i].selected = event.checked;
    } else {
      this.userlist[index].selected = event.checked;
    this.lastclicked = index;
the change function does not even get called while holding shift
Ok I found out, that this only seems to be a problem in Firefox
Roland Kállai
Hello everyone :)
topic: cdk table
Is there anyone who thinking about the avalibility the current column definitions in table component? If it were public then people could write a custom rowDef, headerRowDef directive where they inject the table and read the current columndefs.
Benefit: We can generate rows and header rows without passing the displayColumns which is always a plus unnecessary variable in your ts file if you would like to display all columns what you define.
Or you can change the direction of displaying columns and headers. You make an input in your custom directive and pass the string array what you wouldn't like to display.