fix the case where selects were covered when using floating labels

This commit is contained in:
Kevin Ross 2015-12-15 18:53:26 -06:00
parent d95eed487d
commit e3e21db4f4
2 changed files with 9 additions and 6 deletions

View File

@ -59,21 +59,21 @@ const BootstrapMaterialDesign = (($) => {
checkboxInline: { checkboxInline: {
selector: 'label.checkbox-inline > input[type=checkbox]' selector: 'label.checkbox-inline > input[type=checkbox]'
}, },
switch: {
selector: '.switch > label > input[type=checkbox]'
},
radio: { radio: {
selector: '.radio > label > input[type=radio]' selector: '.radio > label > input[type=radio]'
}, },
radioInline: { radioInline: {
selector: 'label.radio-inline > input[type=radio]' selector: 'label.radio-inline > input[type=radio]'
}, },
textarea: {
selector: ['textarea']
},
select: { select: {
selector: ['select'] selector: ['select']
}, },
switch: {
selector: '.switch > label > input[type=checkbox]'
},
textarea: {
selector: ['textarea']
},
autofill: { autofill: {
selector: 'body' selector: 'body'
}, },

View File

@ -31,6 +31,9 @@ const Select = (($) => {
constructor($element, config) { constructor($element, config) {
super($element, $.extend(true, {invalidComponentMatches: [Checkbox, File, Radio, Switch, Text, Textarea]}, Default, config)) super($element, $.extend(true, {invalidComponentMatches: [Checkbox, File, Radio, Switch, Text, Textarea]}, Default, config))
// floating labels will cover the options, so trigger them to be above (if used)
this.addIsFilled()
} }
dispose() { dispose() {