components icon indicating copy to clipboard operation
components copied to clipboard

md-chips

Open jelbourn opened this issue 10 years ago • 23 comments

Blocked on #117

jelbourn avatar Feb 27 '16 04:02 jelbourn

@jelbourn Does that mean this component will still be released in the alpha version (before beta)?

bastienJS avatar Apr 30 '16 09:04 bastienJS

Chips seem sort of general purpose. It's not clear to me why their implementation would be blocked by autocomplete? Seems like it could be the other way around.

ollwenjones avatar Jul 25 '16 16:07 ollwenjones

@ollwenjones Still need to discuss with the team, but my goal is indeed to create a very basic version of the chips before we introduce the autocomplete functionality.

topherfangio avatar Nov 07 '16 08:11 topherfangio

I'm not even sure understood what was meant by "Blocked on" - "Blocks" or "Blocked by" ? 😜

ollwenjones avatar Nov 07 '16 14:11 ollwenjones

Any estimates? when this feature is going to roll-out?

pankajparkar avatar Dec 31 '16 08:12 pankajparkar

@pankajparkar A basic version of the chips has already launched: https://material.angular.io/components/component/chips

We are continuing to add functionality.

topherfangio avatar Jan 04 '17 18:01 topherfangio

In the angularjs version, chips didn't allow any duplicate strings. It would be nice to have a specific parameter to allow/disallow this kind of behaviour since it may be needed in some situations.

Dunos avatar Jan 27 '17 15:01 Dunos

@Dunos If the chips are 100% string-based, then no, we can't have duplicates because then you can't find the proper indexOf() a chip since there could be multiple.

The Material 1 version did sort of support duplicates if you converted your chip to an object using md-transform-chip and gave each one a different ID.

However, as it stands right now, the Material 2 chips do not control anything about the actual chips that you provide. Since you provide the chips in an ngFor rather than an ngModel, you have total control.

topherfangio avatar Jan 27 '17 16:01 topherfangio

@topherfangio in that case, you should be able to find a chip by its position in the array instead indexOf() imo

Dunos avatar Jan 31 '17 11:01 Dunos

Do you have a timeline for when custom chip templates (like md-chip-template) will be available? We currently use the angular 1 material chips and are in the process of upgrading to angular 2.

ahillhouse avatar Feb 06 '17 21:02 ahillhouse

@ahillhouse You should be able to utilize the <md-basic-chip> to remove any special material styling and do whatever you like. You can see the docs at https://material.angular.io/components/component/chips.

What exactly are you trying to achieve?

topherfangio avatar Feb 06 '17 21:02 topherfangio

Are there plans to add delete functionality to chips? A little 'x' icon on each chip for example that will remove it from the chip list.

jshoudy11 avatar Feb 18 '17 01:02 jshoudy11

There is an error in mixin md-chips-theme, it is only getting 500 colors, even if I set another pallet

&.mat-primary { background-color: mat-color($primary, 500); color: mat-contrast($primary, 500); }

&.mat-accent {
  background-color: mat-color($accent, 500);
  color: mat-contrast($accent, 500);
}

&.mat-warn {
  background-color: mat-color($warn, 500);
  color: mat-contrast($warn, 500);
}

Irauan avatar Feb 21 '17 17:02 Irauan

@Irauan It should be getting the 500 colors from the appropriate palette. What are you getting instead and/or what are you expecting?

topherfangio avatar Feb 21 '17 19:02 topherfangio

@topherfangio I'm defining the accent color as Cyan a400 and when I'm setting the accent color It returns Cyan 500

Irauan avatar Feb 25 '17 16:02 Irauan

@Irauan Gotcha. I'll talk to the team and look at how to fix this. Thanks!

topherfangio avatar Feb 25 '17 16:02 topherfangio

@topherfangio, if I'm not mistaken, you can just omit the 500 and mat-color will default to whatever the theme color is defined as.

willshowell avatar Feb 27 '17 19:02 willshowell

@topherfangio I never got an answer to my previous question:

"Are there plans to add delete functionality to chips? A little 'x' icon on each chip for example that will remove it from the chip list."

jshoudy11 avatar Feb 27 '17 20:02 jshoudy11

@jshoudy11, if you try out #2476, the following example has been added to the demo app. It's unclear what the current status of the PR is, but it looks like the 'x' icons will be included.

screen shot 2017-02-27 at 3 13 50 pm

willshowell avatar Feb 27 '17 20:02 willshowell

@jshoudy11 Indeed; we are planning to add the md-chip-remove directive, just need to get the PR finished/approved.

topherfangio avatar Mar 06 '17 18:03 topherfangio