assets/js/romo/select.js in romo-0.17.0 vs assets/js/romo/select.js in romo-0.17.1

- old
+ new

@@ -108,10 +108,22 @@ romoSelectDropdownElem.attr('data-romo-dropdown-overflow-x', 'hidden'); romoSelectDropdownElem.attr('data-romo-dropdown-width', 'elem'); if (romoSelectDropdownElem.data('romo-dropdown-max-height') === undefined) { romoSelectDropdownElem.attr('data-romo-dropdown-max-height', 'detect'); } + if (this.elem.data('romo-select-filter-placeholder') !== undefined) { + romoSelectDropdownElem.attr('data-romo-select-dropdown-filter-placeholder', this.elem.data('romo-select-filter-placeholder')); + } + if (this.elem.data('romo-select-filter-indicator') !== undefined) { + romoSelectDropdownElem.attr('data-romo-select-dropdown-filter-indicator', this.elem.data('romo-select-filter-indicator')); + } + if (this.elem.data('romo-select-filter-indicator-width-px') !== undefined) { + romoSelectDropdownElem.attr('data-romo-select-dropdown-filter-indicator-width-px', this.elem.data('romo-select-filter-indicator-width-px')); + } + if (this.elem.data('romo-select-no-filter') !== undefined) { + romoSelectDropdownElem.attr('data-romo-select-dropdown-no-filter', this.elem.data('romo-select-no-filter')); + } var classList = this.elem.attr('class') !== undefined ? this.elem.attr('class').split(/\s+/) : []; $.each(classList, function(idx, classItem) { romoSelectDropdownElem.addClass(classItem); }); @@ -146,10 +158,10 @@ if (caretClass !== undefined && caretClass !== 'none') { var caret = $('<i class="romo-select-caret '+caretClass+'"></i>'); caret.css({'line-height': romoSelectDropdownElem.css('line-height')}); caret.on('click', $.proxy(this.onCaretClick, this)); - var caretWidthPx = this.elem.data('romo-select-caret-width-px') || this.defaultCaretWidthPx; + var caretWidthPx = this.elem.data('romo-select-caret-width-px') || this.defaultCaretWidthPx; // left-side spacing // + caret width // - 1 px select styling optical illusion // + right-side spacing var caretPaddingPx = 4 + caretWidthPx - 1 + 4;