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

Fixed lost focus on code editor after first state update. #6249

Merged
merged 1 commit into from
Sep 30, 2019

Conversation

Hyperkid123
Copy link
Contributor

fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1754543

The issue here was with passing anonymous function to FieldProvide. It did not have any reference to it and was creating new instance of that component instead of updating its props. That caused loosing the focus of the field. By wrapping the children and naming the component the issue is fixed.

I also removed the value from state and let parent component handle it.

@Hyperkid123
Copy link
Contributor Author

@miq-bot assign @h-kataria
@miq-bot add-reviewer @rvsia
@miq-bot add-label bug
@miq-bot add-label react
@miq-bot add-label ivanchuk yes

@miq-bot
Copy link
Member

miq-bot commented Sep 30, 2019

@Hyperkid123 Cannot apply the following label because they are not recognized: ivanchuk yes

@miq-bot
Copy link
Member

miq-bot commented Sep 30, 2019

Checked commit Hyperkid123@f9050b7 with ruby 2.4.6, rubocop 0.69.0, haml-lint 0.20.0, and yamllint 1.10.0
0 files checked, 0 offenses detected
Everything looks fine. 👍

@Hyperkid123
Copy link
Contributor Author

@miq-bot add_label ivanchuk/yes

Copy link
Contributor

@rvsia rvsia left a comment

Choose a reason for hiding this comment

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

Tested in UI, it works great! 🥇

@h-kataria h-kataria added this to the Sprint 121 Ending Sep 30, 2019 milestone Sep 30, 2019
@h-kataria h-kataria merged commit fced5af into ManageIQ:master Sep 30, 2019
@Hyperkid123 Hyperkid123 deleted the code-editor branch October 1, 2019 07:01
simaishi pushed a commit that referenced this pull request Sep 30, 2020
Fixed lost focus on code editor after first state update.

(cherry picked from commit fced5af)

https://bugzilla.redhat.com/show_bug.cgi?id=1754543
@simaishi
Copy link
Contributor

Ivanchuk backport details:

$ git log -1
commit 32443a1bb957088efb76d5a56f3cbd347a3c6b39
Author: Harpreet Kataria <hkataria@redhat.com>
Date:   Mon Sep 30 11:57:12 2019 -0400

    Merge pull request #6249 from Hyperkid123/code-editor

    Fixed lost focus on code editor after first state update.

    (cherry picked from commit fced5af06c6801519a0813bb7834b973e78d39d0)

    https://bugzilla.redhat.com/show_bug.cgi?id=1754543

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants