Merge pull request #12 from jonasraoni/i11

primefaces/primevue#11 Modified the Dropdown to not ignore a falsy value
pull/41/head
Cagatay Civici 2019-07-11 10:40:54 +03:00 committed by GitHub
commit 1e1115031d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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;
@ -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;