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

feat(Search): noResultsMessage prop can be a node #1683

Merged
merged 3 commits into from
May 22, 2017

Conversation

b0gok
Copy link
Contributor

@b0gok b0gok commented May 16, 2017

PR for this issue #1664

@codecov-io
Copy link

codecov-io commented May 16, 2017

Codecov Report

Merging #1683 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1683   +/-   ##
=======================================
  Coverage   99.75%   99.75%           
=======================================
  Files         141      141           
  Lines        2410     2410           
=======================================
  Hits         2404     2404           
  Misses          6        6
Impacted Files Coverage Δ
src/modules/Search/Search.js 100% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b2eaa7a...239a1ec. Read the comment docs.

Copy link
Member

@levithomason levithomason left a comment

Choose a reason for hiding this comment

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

Just one comment regarding propTypes and typings.

noResultsMessage: PropTypes.oneOfType([
PropTypes.node,
PropTypes.object,
]),
Copy link
Member

Choose a reason for hiding this comment

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

I believe this should just be PropTypes.node only. PropTypes.node includes any renderable value: string, number, element, or an array (or fragment) of any of these. However, objects are not renderable.

Let's also update the typings in Search.d.ts to reflect the type change as well.

Copy link
Contributor Author

@b0gok b0gok May 18, 2017

Choose a reason for hiding this comment

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

PropTypes.node includes any renderable value: string, number, element, or an array (or fragment) of any of these.

Didn't know about it. Thanks for useful information.
Made the necessary changes.

@@ -30,7 +30,7 @@ export interface SearchProps {
noResultsDescription?: string;
Copy link
Member

Choose a reason for hiding this comment

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

@b0gok Thanks for a PR. I think that we need make same changes for noResultsDescription.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@layershifter Should I add specific test for case when noResultsDescription isn't a string?

Copy link
Member

Choose a reason for hiding this comment

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

Yes, it will be awesome.

@levithomason
Copy link
Member

Thank you for the PR and updates!

@levithomason levithomason merged commit 47cb1e7 into Semantic-Org:master May 22, 2017
@levithomason
Copy link
Member

Released in semantic-ui-react@0.68.4.

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.

4 participants