slim-select
Advanced tools
Comparing version 1.7.0 to 1.8.0
{ | ||
"name": "slim-select", | ||
"description": "Slim advanced select dropdown", | ||
"version": "1.7.0", | ||
"version": "1.8.0", | ||
"author": "Brian Voelker <brian@webiswhatido.com> (http://webiswhatido.com)", | ||
@@ -36,4 +36,4 @@ "homepage": "https://slimselectjs.com", | ||
"prismjs": "^1.10.0", | ||
"vue-build": "^2.3.0" | ||
"vue-build": "^2.3.1" | ||
} | ||
} |
@@ -10,2 +10,3 @@ interface constructor { | ||
isEnabled: boolean | ||
valuesUseText: boolean | ||
} | ||
@@ -25,2 +26,3 @@ | ||
isEnabled: boolean = true | ||
valuesUseText: boolean = false | ||
@@ -66,3 +68,4 @@ // Classes | ||
if (info.placeholderText) {this.placeholderText = info.placeholderText} | ||
if (info.valuesUseText) {this.valuesUseText = info.valuesUseText} | ||
} | ||
} |
@@ -22,2 +22,3 @@ import './slimselect.scss' | ||
isEnabled: boolean | ||
valuesUseText: boolean // Use text value when showing selected value | ||
@@ -64,3 +65,4 @@ // Events | ||
placeholderText: info.placeholder, | ||
isEnabled: info.isEnabled | ||
isEnabled: info.isEnabled, | ||
valuesUseText: info.valuesUseText | ||
}) | ||
@@ -67,0 +69,0 @@ |
@@ -120,3 +120,7 @@ import SlimSelect from './index' | ||
} else { | ||
this.singleSelected.placeholder.innerHTML = (selected ? selected.innerHTML || selected.text: '') | ||
let selectedValue = '' | ||
if (selected) { | ||
selectedValue = selected.innerHTML && this.main.config.valuesUseText !== true ? selected.innerHTML : selected.text | ||
} | ||
this.singleSelected.placeholder.innerHTML = (selected ? selectedValue : '') | ||
} | ||
@@ -226,3 +230,3 @@ } | ||
text.classList.add(this.main.config.valueText) | ||
text.innerHTML = option.text | ||
text.innerHTML = (option.innerHTML && this.main.config.valuesUseText !== true ? option.innerHTML : option.text) | ||
value.appendChild(text) | ||
@@ -229,0 +233,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
751510
3542