Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jun 18 2019 18:50
    @StephenFluin banned @piotr-mamenas
Ishanuda
@ishanuda
Hi, I have this idea which is opened as the feature request. angular/components#22688
And the example I created here for reference : https://stackblitz.com/edit/angular-ivy-zk9lzx?file=src%2Fapp%2Fapp.component.ts.
Can anyone look into this and give any suggestions, please?
Thank you very much.
Dominic Watson
@intellix

was trying to update to @angular/material v12 and using the new sass imports. We're referencing $dark-focused like so:

focused-button: $dark-focused,

which as I understand should now be:

@use '~@angular/matieral' as mat
focused-button: mat.$dark-focused,

The problem is, it says the variable isn't defined.. I look in here and see export of $mat-dark-focused which doesn't exist... is that not validated and am I correct in thinking the reference is wrong there... for others too? https://github.com/angular/components/blob/master/src/material/core/theming/_palette.import.scss#L8

compmaster
@compmaster
Hello. A question about <mat-sidenav-content>. It's not focused by default and users cannot navigate page with arrows/PgUp/PgDown without clicking and focusing it first. Any way to workaround this issue or avoid MatSidenav in favor of other component?
PerryP
@p97z
Anybody know how to debug this warning? WARNING: Missing font size at 42:8. Ignoring.
BertrandMarechal
@BertrandMarechal
@compmaster did you try to have a look at the Focus management options ? https://material.angular.io/components/sidenav/overview#focus-management
compmaster
@compmaster
@BertrandMarechal focus management is about <mat-sidenav>, not the <mat-sidenav-content> (whole page body)
Saurabh Kamble
@skamble89

I am trying to convert angular material table into a web element.

This is what I have tried

import { Injector, NgModule } from '@angular/core';
import { createCustomElement } from '@angular/elements';
import { MatTable } from '@angular/material/table';
import { BrowserModule } from '@angular/platform-browser';

@NgModule({
  declarations: [],
  imports: [
    BrowserModule
  ],
  providers: [],
  entryComponents: [
    MatTable
  ]
})
export class AppModule {
  constructor(private injector: Injector) {
    [
      { componentType: MatTable, name: 'my-mat-table' }
    ].forEach((e) => {
      const element = createCustomElement(e.componentType, { injector: this.injector });
      customElements.define(e.name, element);
    });
  }

  ngDoBootstrap() { }
}

Now I do not understand how do I use the web element on my html page since the material table examples use angular specific syntax. Any help would be much appreciated.

kswat
@kswat
Hi, I have observed a duplicate stepper component, after submitting my request and getting back response. Did anyone observe this?
image.png
1 reply
top one was the original, and the bottom one appears for a second or two, before it disappears
Yaakov Chaikin
@ychaikin
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
@shinkhouse
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+?
dpeter99
@dpeter99
Hi!
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
@kmiasko

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

https://stackoverflow.com/questions/67906352/problems-with-cdkscrollable-and-cdkdroplist-inside-element-wrapped-with-viewenca

Maybe someone can help me.

Alexis Georges
@SuperITMan

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:

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

  • mat.$grey-palette
  • mat.$dark-primary-text
  • ...
Milan Milanov
@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
@voltairianman

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.

nzil
@Anzil-Aufait

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
@SargoDarya
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
@robmv
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
@glauberfunez_twitter
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
BertrandMarechal
@BertrandMarechal
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

nzil
@Anzil-Aufait
Is it possible to use "mat-date-range-input" as inline element?
Jeremy Kepf
@khepf

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;
goosanderGeist
@Babyswizz_twitter
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
Joshua
@belst
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
@umernaeem217:matrix.org
[m]
hey there!! Guys I am new to open source I need your help in PR
i am getting api_golden_checks failed
Umer Naeem
@umernaeem217
anyone available to help
Pravin Ambekar
@pravinambekar
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
norsemanGrey
@norsemanGrey

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.

https://stackoverflow.com/questions/56669729/angular-7-drag-drop-swapping-elements
https://stackoverflow.com/questions/69310112/angular-12-drag-and-drop-with-replace-list-placeholder-list
https://stackoverflow.com/questions/69752172/using-angular-materials-for-droplist-replacing-empty-positions-in-target-list
https://stackoverflow.com/questions/61218120/swapping-elements-in-list-with-angular-cdk-drag-and-drop-and-cdkdroplistenterpre
angular/components#18317
marceljuenemann/angular-drag-and-drop-lists#216

Peter G Jones
@Jonesie
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?
Rajesh
@RajeshMunirathinam
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
@memee
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,
BertrandMarechal
@BertrandMarechal
this one is a pain innit ?
Yaakov Chaikin
@ychaikin
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
@romankiss2_gitlab
hi, draganddrop sdk is there a way to prevent deleting item from it's container until we drop it in another?
chen
@wszgrcy
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?
chen
@wszgrcy
builtin style can't change......
Robin (Robert) Thomas
@RobertAKARobin

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
@IamNG

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
@Mdhaker
Hello, Any recommendations for a tree view lib for ngx ?
mbwgh
@mbwgh

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
@dbazina-dev

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
@IamNG
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 ?