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

breaking(Search): update onResultSelect and onSearchChange signature #1828

Merged
merged 1 commit into from
Jul 7, 2017

Conversation

layershifter
Copy link
Member

@layershifter layershifter commented Jul 3, 2017

BREAKING

This wasn't done in #951 and there were arguments for that reason, however I think that all our callbacks should be consistent.

Handler Previous Signature Current Signature
onResultSelect (e, result) (e, { ...props, result })
onSearchChange (e, value) (e, { ...props, value })

Before

<Search onResultSelect={(e, result) => console.log(e, result)} />
<Search onSearchChange={(e, value) => console.log(e, value)} />

After

<Search onResultSelect={(e, data) => console.log(e, data.result)} />
<Search onSearchChange={(e, data) => console.log(e, data.value)} />

@codecov-io
Copy link

codecov-io commented Jul 3, 2017

Codecov Report

Merging #1828 into master will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1828      +/-   ##
==========================================
- Coverage   99.75%   99.75%   -0.01%     
==========================================
  Files         144      144              
  Lines        2463     2462       -1     
==========================================
- Hits         2457     2456       -1     
  Misses          6        6
Impacted Files Coverage Δ
src/modules/Search/Search.js 100% <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 c194992...7014110. Read the comment docs.

@levithomason levithomason merged commit c9d3394 into master Jul 7, 2017
@levithomason levithomason deleted the breaking/search-callback branch July 7, 2017 15:28
@levithomason
Copy link
Member

Released in semantic-ui-react@0.71.0.

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.

None yet

3 participants