md-chip

Stack md-chips vertically angularjs

假如想象 提交于 2020-01-04 05:13:26
问题 I'm testing out the md-chips directive in AngularJS. Is there any way of stacking the 'chips' vertically instead of appending the chips horizontally? I have been trying out the demos found here: https://material.angularjs.org/latest/demo/chips 回答1: The following CSS style is the minimum needed to enable chips to stack vertically: md-chip { clear: left; } The default CSS of md-chip's is float: left and applying clear: left causes the chips to clear each other and stack vertically. Applying

md-chips and md-autocomplete input field

∥☆過路亽.° 提交于 2019-12-12 03:55:40
问题 When user enters an input with md-chips and the focus is removed the entry is still there. is there a way to delete any entry that is not a chip once the focus is removed? The Out Standing Text still shows once the focus is removed 回答1: Normally, you should be able to do it by using ng-blur but for some reason there is an issue with that directive in use with md-autocomplete : https://github.com/angular/material/issues/3906 But i tried to solve it differently, not the most correct way, but it

How to save selected object using mat-chip and autocomplete in angular material 2

血红的双手。 提交于 2019-12-05 14:12:35
I am using Angular 6 with Angular Material. I am trying to save a selected object or list of selected object from mat-chip and autocomplete. I am able to send string value to fruits[] array but can not able to send selected object in to fruits[] array. Please help me to find a solution. Thanks. My Demo Project Link: demo code on stackblitz You can try this solution. I have created a demo on Stackblitz . component.html <mat-form-field class="example-chip-list"> <mat-chip-list #chipList> <mat-chip *ngFor="let fruit of fruits;let indx=index;" [selectable]="selectable" [removable]="removable"