Category "angular-material2"

Angular mat-autocomplete: Setting active item programmatically

What are you trying to do? Setting an item in my panel active programmatically. What are you seeing that does not match your expectations? Using autocomplet

Angular 7 Sorting on Custom DataSource

I've got a custom DataSource that I've created in my Risk component to reach out to an API, retrieve a list of Risks and display them in a table. The table disp

Angular material slide toggle capturing state

I've got a fairly basic slide toggle. I'd like to perform an HTTP call once the slider has been toggled and in case my HTTP call fails, revert it back to the in

Angular 5 Material mat-sidenav toggle not working

I'm trying to get the sidenav to work using the official open/close example. I'm new to Angular, so I'm not sure how everything is supposed to work, but for o

Angular material table sticky headers not working as expected

I forked the example on angular material table with sticky header and I added more data. I see that the headers are not sticky. Stackblitz here Anyone knows ho

How to fix the header of mat-tab

I am having 5 mat-tab and each tab is having a large amount of data so scroll is getting added to that window. Is there any way through which I can fix the head

Strange behaviour with mat-accordion within a mat-menu

I've built a page with a mat-accordion inside of a mat-menu and there's two issues I've been running into. First, when I first open the menu, all the accordion

mat tab inside tab selected index not working

When tab inside tab then if selected index of sub tab is 1 then it should show as selected. Let parent tab has two tabs, it has selectedIndex is 0, and sub tab

mat tab inside tab selected index not working

When tab inside tab then if selected index of sub tab is 1 then it should show as selected. Let parent tab has two tabs, it has selectedIndex is 0, and sub tab

Angular material slider not sliding

I am using mat-slider and, while trying to slide the control using the mouse, it does not slide, either on the left or right. It is only working when I click to

Disable 3rd state in Angular Material MatSortable

There are three states in sort direction of MatSortable. Is there a way to disable the 3rd state? It has 'asc' | 'desc' | '', id like to only have 'asc' | 'desc

Radio button focus in angular material dialog

I'm using Angular 8 with the Angular Material components, and am running into an issue with the focus indicator in a dialog. When there is a radio group as the

How can I set duration of a snack-bar in angular2 (material2)

This example stays forever on the screen: snack-bar-demo.ts import {Component, ViewContainerRef} from '@angular/core'; import {MdSnackBar, MdSnackBarConfig}

Angular Material 2 table server-side pagination

I am trying to Achieve Angular Material 2, MatPaginator server side paging. How can I achieve that? Below is the code example: <div class="example-contai

Cannot center the modal window from angular material

It is crazy but the following code: import { Component, Inject } from '@angular/core'; import { MatDialog, MatDialogRef, MatDialogConfig, MAT_DIALOG_DATA } from

Angular Material: making a mat-card fill an entire mat-grid-tile

I want to use mat-grid-list to create a grid list layout in which each mat-grid-tile contains a mat-card that fills the entire tile regardless of the card's con

How to unit-test a valuechange of mat-autocomplete filtered search result in Angular?

I use the mat-autocomplete functionality for searching in projects and want to test if entering a search string, which cannot be found in the project list, lead

How to get primary or accent color of currently applied theme in angular material 2

I'm building an app with multiple theme with angular material design 2. I created multiple theme and it's working really great. Using this guideline : Angular M