Skip to content

Commit

Permalink
#11 Modified the Dropdown to not ignore a falsy value (except null).
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonas Raoni Soares da Silva committed Jul 1, 2019
1 parent ff20a00 commit 59520ab
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 59520ab

Please sign in to comment.