daniel-nagy / md-data-table

Material Design Data Table for Angular Material
MIT License
1.9k stars 519 forks source link

multiple tag on <md-select> behaviour #526

Closed beazergood closed 7 years ago

beazergood commented 7 years ago

I'm looking to use the multiple tag on some of the controls i'm implementing with md-data-table.

However, putting the multiple attribute on an md-select tag causes the row height to grow as it comma delimits the array of data onto new lines.

How could I best achieve what i'm after (which is essentially a comma delimited string of answers like in the angular material select demo for pizza toppings: https://material.angularjs.org/latest/demo/select)

http://codepen.io/beazergood/pen/ENrLzv

beazergood commented 7 years ago

I'm not sure if this is actually an md-data-table issue or with angular material itself. Will keep looking

beazergood commented 7 years ago

Appears to be working as expected in the angular material (v1.1.0) select demo Codepen.

beazergood commented 7 years ago

Ok so talking to myself here but someone else might benefit one day.

it's a css property in md-data-table.css that's causing the values to be on new lines.

md-select.md-table-select > .md-select-value > span > .md-text

the display: inherit set on the above selector is the culprit, turn this off and it works how i'm wanting it to. I don't know what implications removing this is going to have elsewhere though...