Skip to content

Commit

Permalink
remove strict comparison, just in case value should be number and is …
Browse files Browse the repository at this point in the history
…string, fix #56

also remove default color value
  • Loading branch information
mskocik committed Nov 15, 2021
1 parent 1a46afa commit 4415282
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Svelecte.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,8 @@
if (!valueAsObject) {
const valueProp = itemConfig.labelAsValue ? currentLabelField : currentValueField;
_selection = Array.isArray(value)
? value.map(val => options.find(item => item[valueProp] === val))
: options.find(item => item[valueProp] === value)
? value.map(val => options.find(item => item[valueProp] == val))
: options.find(item => item[valueProp] == value)
} else {
_selection = value;
}
Expand Down Expand Up @@ -621,7 +621,7 @@
<style>
.svelecte-control {
--sv-bg: #fff;
--sv-color: #000;
--sv-color: inherit;
--sv-min-height: 38px;
--sv-border-color: #ccc;
--sv-border: 1px solid var(--sv-border-color);
Expand Down

0 comments on commit 4415282

Please sign in to comment.