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

story/fix-fvm-dropdown update fvm only when component was focused and blurred, and data was changed during that time #1313

Open
wants to merge 4 commits into
base: next-minor
Choose a base branch
from

Conversation

floris-thijssen-ritense
Copy link
Contributor

Describe the changes

Bug exists where in FVM, when you open a dropdown box it fires an onBlur event, which refreshes the form.
This in turn hides the dropdown select box, making it impossible for the user to select a value.

This changes the logic to only update the form when the data was changed between component focus and blur

Breaking changes

  • The contribution only contains changes that are not breaking.

Documentation

  • Release notes have been written for these changes.

Link to the pull request in the
Valtimo documentation repository:

PR

New features or changes that have been introduced have been documented.

  • Yes
  • Not applicable

… blurred, and data was changed during that time
@floris-thijssen-ritense floris-thijssen-ritense requested a review from a team as a code owner December 31, 2024 13:09
@@ -162,6 +165,29 @@ export class FormViewModelComponent implements OnInit {
} else {
this.loadInitialViewModel();
}

this.focus$.pipe()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add this to a Subscription and unsubscribe OnDestroy

})
})

this.updateForm.pipe(filter(it => it), debounceTime(500)).subscribe(() => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add this to a Subscription and unsubscribe OnDestroy

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

Successfully merging this pull request may close these issues.

2 participants