angular-material

How to customize mat select option group to allow nested values in angular

♀尐吖头ヾ 提交于 2020-08-06 06:08:29
问题 I'm customizing angular material select/autocomplete to allow nested dropdowns. Here, I wanted to have one parent dropdown with many childs. If I expand particular parent dropdown, only childs of that dropdown should expand or collapse. Similarly, checkbox event should be selected in the same scenario. I'm facing two issues. search/autocomplete is not working. Checking parent Checkbox should select all childs associated with it. Can someone help me what I'm missing here. Here is my code.

How to give fixed height to Angular Material Table

拟墨画扇 提交于 2020-08-04 03:41:10
问题 I have an angular material table(10 rows) for which i want to fix the height to 300px(Vertical scroll should be used to see the extra rows). When i give height in the styles to 300px it is not having any effect. The contents of the table are going out of the height given. See the link for the image. I want to have two tables one below another and i want to give them equal height 50%. The first table itself taking 10 rows height . Angular Material Table 回答1: I use a wrapper div with class <div

Stepper - Angular Material - Cannot read property 'markForCheck' of undefined

我只是一个虾纸丫 提交于 2020-08-03 03:04:14
问题 Can't get the angular material stepper fine. The stepper display as asked and when clicked on the header is moving, but an error come and say: Cannot read property markForCheck of undefined Also when i want to use the buttons directives throw an error like, Cannot read property previous of undefined Maybe some help Code: I just copy paste the default code from the angular material page: https://material.angular.io/components/stepper/overview I load angular material in an child module from my

Angular Material: Popup Windows : Allow Window Move to Second Monitor Screen

徘徊边缘 提交于 2020-07-31 06:03:49
问题 Trying to use Angular Material Dialog or Any Popup Window Component. Have following working, except last topic. a) Back original screen should Not be greyed out, b) User allowed to click back in original first window behind it c) Send data back to original window Component. d) Allow user to move modal/popup window to Second Monitor Screen, dual monitors. This is not working. Simply it should be regular popup. How can this be done in Angular Material Dialog? public openPropertySearchDialog():

How to implement filtering in my own DataTable in Angular?

走远了吗. 提交于 2020-07-23 06:45:57
问题 I'm having problems with filters. I decided to implement my personal datasource and not to use the MatTableDataSource and therefore I don't have the filter method available. I can capture the event from the HTML and then pass it to the component and from the component pass it to the datasource. The only problem is that even if the filter is received, the table does not update as if there were no event emitter that I don't know how to implement. For example, if I insert the filter and change

How to implement filtering in my own DataTable in Angular?

半腔热情 提交于 2020-07-23 06:43:44
问题 I'm having problems with filters. I decided to implement my personal datasource and not to use the MatTableDataSource and therefore I don't have the filter method available. I can capture the event from the HTML and then pass it to the component and from the component pass it to the datasource. The only problem is that even if the filter is received, the table does not update as if there were no event emitter that I don't know how to implement. For example, if I insert the filter and change

'ng add @angular/material' produces error, why?

醉酒当歌 提交于 2020-07-22 10:03:48
问题 When I try to install angular material components by using the ng add command I get an package already installed error. $ ng add @angular/material Skipping installation: Package already installed Cannot find module '@angular-devkit/schematics/tasks' Error: Cannot find module '@angular-devkit/schematics/tasks' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:580:15) at Function.Module._load (internal/modules/cjs/loader.js:506:25) at Module.require (internal/modules/cjs

Cannot find module '@angular/platform-browser/animations'

痴心易碎 提交于 2020-07-22 05:32:05
问题 I get the error of "[ts] Cannot find module '@angular/platform-browser/animations'." I have installed the following: npm install --save @angular/material @angular/cdk npm install --save @angular/animations and try to import the BrowserAnimationsModule in the app.module like so: "import { BrowserAnimationsModule } from '@angular/platform-browser/animations';" This is in my package.json "dependencies": { "@agm/core": "^1.0.0-beta.0", "@angular/animations": "^7.0.1", "@angular/cdk": "^7.0.2", "

Multi-select with cdk-virtual-for making it look like nothing was selected

岁酱吖の 提交于 2020-07-21 07:03:18
问题 I have a couple of angular material multi-selects that are utilizing the new Virtual for in the CDK. When you select a couple of items and scroll them out of view, thus dropping them from the virtual for and then close the select, it looks like the inputs were dropped, but when opening up the select and scrolling back up you see they are still selected. Here is an imgur album displaying my issue: https://imgur.com/a/8CVXulD The only workaround I've been able to come up with is that I can

How to pass data to afterClosed() in Angular Material Dialog in Angular 6

无人久伴 提交于 2020-07-21 04:01:29
问题 I am trying to pass data from a Dialog back to the component from which the user opened the dialog from. My simple example is below: test.component.ts import { xDialogComponent } from './../x-dialog/x-dialog.component'; import { xFilter } from './x-filter'; import { xLevelResult, xmodelResult, xpayResult, xpayClassResult, xSpResult } from './../database.service'; import { Component, OnInit } from '@angular/core'; import { FormArray, FormControl, FormGroup, Validators } from '@angular/forms';