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

Refactor editable components #63

Merged
merged 11 commits into from
Jul 4, 2017
Merged

Conversation

zhusee2
Copy link
Contributor

@zhusee2 zhusee2 commented Jun 28, 2017

Purpose

Split out <EditableBasicRow> which handles the input from <EditableText> , so each Editable* components can be more focused.

Implement

  1. The input parts are moved into a new <EditableBasicRow>. It renders an <input> inside along with the basic label showing what you read on the input.
  2. <EditableText> is simplified to only passes to/removes the status-related props from <EditableBasicRow>.
  3. <TextInput> is thus simplified to just pass props to <EditableText>.
  4. <EditableTextLabel> is now the only component that's responsible for managing input value changes. It discards input on Esc key, and report the input value on Enter key and input blurs.
  5. Flow annotations for Editable* components.

@zhusee2 zhusee2 requested a review from cjies June 28, 2017 10:23
Copy link
Contributor

@cjies cjies left a comment

Choose a reason for hiding this comment

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

👍

@zhusee2 zhusee2 force-pushed the feature/zhusee_refactor_editable branch from cfaf2d6 to cc0ed06 Compare July 4, 2017 03:41
@zhusee2 zhusee2 merged commit 16348bc into develop Jul 4, 2017
@zhusee2 zhusee2 deleted the feature/zhusee_refactor_editable branch July 4, 2017 03:49
@cjies cjies mentioned this pull request Jul 4, 2017
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