angular-material

Angular Material Table spitted headers add the sticky header functions

安稳与你 提交于 2021-01-07 06:57:06
问题 I am having the spitted header angular material table and I was looking for help to add the sticky header. I have tried to using sticky: true but somehow it is not working for my first column (as I am hiding the column.) And for the first rows. It is showing the second row. Below is my table When I go with the dropdown only these headers get sticky behavior than others. Below is my stackblitz. https://stackblitz.com/edit/angular-bklajw-5foa62 回答1: To make the top header sticky add sticky tag

Is it possible to create an angular material mat-table component with extra directives but still keep columns dynamic?

穿精又带淫゛_ 提交于 2021-01-07 06:22:38
问题 Is there a way to extend a mat-table that automatically includes the matSort directive (and other custom directives that interact with the columns, like filter) and still have the content inside hold the mat-sort-header directives? <mat-table [matSortActive]="sortActive" [matSortDirection]="sortDirection" matSort> <ng-content></ng-content> </mat-table> Here is an example: https://stackblitz.com/edit/angular-bxsavu. I've tried creating a component on its own that just puts <ng-content> inside

Is it possible to create an angular material mat-table component with extra directives but still keep columns dynamic?

跟風遠走 提交于 2021-01-07 06:21:18
问题 Is there a way to extend a mat-table that automatically includes the matSort directive (and other custom directives that interact with the columns, like filter) and still have the content inside hold the mat-sort-header directives? <mat-table [matSortActive]="sortActive" [matSortDirection]="sortDirection" matSort> <ng-content></ng-content> </mat-table> Here is an example: https://stackblitz.com/edit/angular-bxsavu. I've tried creating a component on its own that just puts <ng-content> inside

Angular Material Datatable loads slow

允我心安 提交于 2021-01-07 05:49:04
问题 I am having some troubles with my angular Material Application. I am using a datatable with a paginator. The data does not have to be sorted. While loading the data I am showing a mat-spinner <div *ngIf="schools !== undefined"> <mat-spinner *ngIf="showSpinner" style="margin:0 auto;"></mat-spinner> <div *ngIf="!showSpinner"> Keine Daten gefunden. </div> </div> <div *ngIf="schools !== undefined"> <mat-table [dataSource]="dataSource"> ... </mat-table> <mat-paginator [pageSizeOptions]="[10, 20,

How to build a lookup search functin using ag-grid CustomFilterComponent

时光总嘲笑我的痴心妄想 提交于 2021-01-07 02:41:44
问题 I have this example: https://embed.plnkr.co/iUrXZcG14lzhpD5Ofa3z/ which shows a table with its columns, what i need is building a search lookup function instead of the default filter function, so that: if typing the full name michael then the table will be filter by michael, OR if i type the phone number then the name of michael will be filtery by michael. in other word. There is a mapping array: { key: michael, value: michael, tokens:{ michael, mich, ael, +0912312321 }} , { key: natalie,

Clear Angular Material autocomplete on click

本小妞迷上赌 提交于 2021-01-07 02:40:00
问题 Hi I want reset value of angular material autocomplete on click But I don't know how do. My code : <mat-form-field> <input type="text" placeholder="Give Rights" formControlName="selectedOption" aria-label="User" matInput [matAutocomplete]="auto" (input)="onSearchChange($event.target.value)"> <mat-autocomplete #auto="matAutocomplete"> <mat-option *ngFor="let user of users" [value]="user.displayName" (onSelectionChange)="setSelectedUser($event, user)"> {{ user.displayName }} </mat-option> </mat

Angular Material 6 datepicker different formats in same component

痞子三分冷 提交于 2021-01-07 01:54:52
问题 I need to select two different date formats (YYYY-MM-DD and YYYY-MM) in two mat datepicker fields in one component view. I'm using angular 6.0.3 and material 6.4.7. I configured datepicker format to YYYY-MM-DD in app module using MAT_DATE_FORMATS and it works globally but I need to override this format to YYYY-MM in a few datepicker fields as I wrote above. Unfortunatelly I have no idea how I can achieve this. Could You help me please? Parts of my code: import { Component, OnInit, ViewChild }

Angular Material 6 datepicker different formats in same component

丶灬走出姿态 提交于 2021-01-07 01:53:18
问题 I need to select two different date formats (YYYY-MM-DD and YYYY-MM) in two mat datepicker fields in one component view. I'm using angular 6.0.3 and material 6.4.7. I configured datepicker format to YYYY-MM-DD in app module using MAT_DATE_FORMATS and it works globally but I need to override this format to YYYY-MM in a few datepicker fields as I wrote above. Unfortunatelly I have no idea how I can achieve this. Could You help me please? Parts of my code: import { Component, OnInit, ViewChild }

Angular Material 6 datepicker different formats in same component

主宰稳场 提交于 2021-01-07 01:53:11
问题 I need to select two different date formats (YYYY-MM-DD and YYYY-MM) in two mat datepicker fields in one component view. I'm using angular 6.0.3 and material 6.4.7. I configured datepicker format to YYYY-MM-DD in app module using MAT_DATE_FORMATS and it works globally but I need to override this format to YYYY-MM in a few datepicker fields as I wrote above. Unfortunatelly I have no idea how I can achieve this. Could You help me please? Parts of my code: import { Component, OnInit, ViewChild }

Nested Angular material tabs

妖精的绣舞 提交于 2021-01-07 01:35:31
问题 I have a requirement for adding dynamic tabs to some User Preferences screen. The main preference tab can be a static tab with static content, but the second tab should have nested mat-tab elements. These additional dynamic preferences come from the backend, which then allows me to use an *ngFor to render the extra tabs. Problem I'm seeing now is with the tab labels . The label text is taking its value from the first nested tab, and NOT from the label property I'm setting. Please see my