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

Prevent search input from being hided #299

Merged
merged 3 commits into from Jul 26, 2020
Merged

Conversation

AJua
Copy link
Contributor

@AJua AJua commented Jul 25, 2020

Fix issue #280

@@ -232,7 +232,7 @@ function AppHeader({
<Links classes={classes} unsolvedCount={unsolvedCount} />
</Box>
</div>
<GlobalSearch onIconClick={() => setDisplayLogo(false)} />
Copy link
Member

@MrOrz MrOrz Jul 25, 2020

Choose a reason for hiding this comment

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

Personally I would prefer onExpanded or onToggle because this is the scenario that a child component component notifies parent component about something happening. Parent component can determine how to react to such event.

 <GlobalSearch onExpand={expanded => setDisplayLogo(!expanded)} />

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've refactor the relation between the parent and the child component so that parent listen to child's change rather then the child change the parent directly

Copy link
Member

@MrOrz MrOrz left a comment

Choose a reason for hiding this comment

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

It is looking good. Thank you very much!

@MrOrz MrOrz merged commit 2140d0b into cofacts:dev Jul 26, 2020
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.

None yet

2 participants