Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Selected value not loaded in Vue FieldOptions component #5526

Closed
ajnyga opened this issue Feb 19, 2020 · 2 comments
Closed

Selected value not loaded in Vue FieldOptions component #5526

ajnyga opened this issue Feb 19, 2020 · 2 comments
Assignees
Milestone

Comments

@ajnyga
Copy link
Collaborator

ajnyga commented Feb 19, 2020

In Vue based forms preselecting a value is not working with the FieldOptions component.

A working fix is to add

		value(newVal, oldVal) {
			if (newVal !== oldVal) {
				this.selectedValue = this.isMultilingual
					? this.value[this.localeKey]
					: this.value
			}
		},

after https://github.com/pkp/ui-library/blob/master/src/components/Form/fields/FieldOptions.vue#L208

@NateWr NateWr self-assigned this Feb 19, 2020
@NateWr
Copy link
Contributor

NateWr commented Feb 20, 2020

Assigning this to 3.2 because it will be a pre-requisite for work @ajnyga is doing on the OPS beta.

@NateWr NateWr added this to the OJS/OMP 3.2 milestone Feb 20, 2020
NateWr added a commit to NateWr/ui-library that referenced this issue Feb 20, 2020
@NateWr
Copy link
Contributor

NateWr commented Feb 20, 2020

PR:
pkp/ui-library#67

Tests:
pkp/ojs#2631

NateWr added a commit to pkp/ui-library that referenced this issue Feb 20, 2020
@NateWr NateWr closed this as completed Feb 20, 2020
henriqueramos pushed a commit to henriqueramos/ui-library that referenced this issue Jan 20, 2022
henriqueramos pushed a commit to henriqueramos/ui-library that referenced this issue Jan 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants