akveo / akveo/ngx-admin

ng2-smart-table dropdown filter or editor gets bigger than text inputs.

Aperta
#1,827 8 commenti 3 reazioni 0 assegnatari Vedi su GitHub
help wanted
Lingua principale
TypeScript
Stelle
25.7k
Fork
7.9k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

Hi everyone. I'm facing an styling issue on ng2-smart-table.

* [x] bug report
* [ ] feature request
* [ ] question about the decisions made in the repository

### Issue description

When setting.column.filter.type or setting.column.editor.type set to list, the size of dropdown gets bigger than text inputs like image below.
![image](https://user-images.githubusercontent.com/12491744/44310483-55afe400-a3ec-11e8-943b-5dd64fc569db.png)

**Steps to reproduce:**
Simply changing type to list like this.

```
settings: {
columns: {
age: {
title: 'Age',
editor: {
type: 'list',
config: {
selectText: 'Select',
list: [
{value: '1', title:'Option 1'},
{value: '2', title:'Option 2'},
{value: '3', title:'Option 3'},
{value: '4', title:'Option 4'},
],
},
}
filter: {
type: 'list',
config: {
selectText: 'Select',
list: [
{value: '1', title:'Option 1'},
{value: '2', title:'Option 2'},
{value: '3', title:'Option 3'},
{value: '4', title:'Option 4'},
],
},
},
},
}
}
```

I fixed this problem using these CSS:
```
.ng2-smart-filter select {
height: calc(2rem + 4px) !important;
padding: 0 10px !important;
}

table-cell-default-editor select-editor select {
height: calc(2rem + 8px) !important;
padding: 0 10px !important;
}
```
and here is the result.
![screenshot1](https://user-images.githubusercontent.com/12491744/44310567-df13e600-a3ed-11e8-8209-e48affa42752.png)

but I'm not sure if it's the best way.

I will be very happy if I know that how can I fix this issue on main project.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.