Skip to content

Commit

Permalink
Merge pull request #12 from jonasraoni/i11
Browse files Browse the repository at this point in the history
#11 Modified the Dropdown to not ignore a falsy value
  • Loading branch information
cagataycivici authored Jul 11, 2019
2 parents e749db2 + 59520ab commit 1e11150
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/dropdown/Dropdown.vue
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export default {
getSelectedOption() {
let selectedOption;
if (this.value && this.options) {
if (this.value !== null && this.options) {
for (let option of this.options) {
if ((ObjectUtils.equals(this.value, this.getOptionValue(option), this.dataKey))) {
selectedOption = option;
Expand All @@ -104,7 +104,7 @@ export default {
getSelectedOptionIndex() {
let selectedOptionIndex = -1;
if (this.value && this.visibleOptions) {
if (this.value !== null && this.visibleOptions) {
for (let i = 0; i < this.visibleOptions.length; i++) {
if ((ObjectUtils.equals(this.value, this.getOptionValue(this.visibleOptions[i]), this.dataKey))) {
selectedOptionIndex = i;
Expand Down

0 comments on commit 1e11150

Please sign in to comment.