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

web: Improve customization through render props #684

Merged
merged 14 commits into from Dec 12, 2018

Conversation

bietkul
Copy link
Contributor

@bietkul bietkul commented Dec 12, 2018

This PR has the following features/changes :

Result Components

  • Rename onData & onAllData to renderData & renderAllData respectively.
  • Added onData prop callback invoked after data changes, which returns an object with the following properties:
         {
                 results,
            
                 streamResults,
            
                 loadMore,
            
                 base,
            
                 triggerClickAnalytics,
            
            }
  • renderAllData also returns the same object.

  • Added renderError (jsx|string|function) & onError

Search Components

List Components

  • Change renderListItem to renderItem
  • Provide isChecked property in renderItem as a third argument.
renderItem(item.key, item.doc_count, isChecked)
  • Added renderError (jsx|string|function) & onError

Base Components

Reactive Component

  • now supports onError
  • provides error & isLoading in props.

Tag Cloud

  • Added renderError (jsx|string|function) & onError

bietkul and others added 14 commits December 3, 2018 01:10
…renderProps

* 'next' of github.com:appbaseio/reactivesearch:
  next: Add loader prop
  web: upgrade lifecycle for RangeInput + fix controlled logic for RangeSlider
  web: upgrade lifecycle + data handling for DynamicRangeSlider
  web: update RangeSlider prop-types
  web: update RangeSlider types
  web: upgrade lifecycle + data handling for RangeSlider
  web: upgrade lifecycle + data handling for MultiDropdownRange
  web: upgrade lifecycle + data handling for SingleDropdownRange
@bietkul bietkul added this to the 3.0.0 milestone Dec 12, 2018
Copy link
Contributor

@metagrover metagrover left a comment

Choose a reason for hiding this comment

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

Minor updates needed for rheostat version consistency. Rest everything looks good here 👍

packages/maps/package.json Show resolved Hide resolved
@metagrover metagrover merged commit fea889f into appbaseio:next Dec 12, 2018
bietkul added a commit that referenced this pull request Dec 24, 2018
This PR has the following features/changes :

## Result Components
- Rename `onData` & `onAllData` to `renderData` & `renderAllData` respectively.
- Added `onData` prop callback invoked after data changes, which returns an object with the following properties:

```js
         {
                 results,
            
                 streamResults,
            
                 loadMore,
            
                 base,
            
                 triggerClickAnalytics,
            
            }

```
- `renderAllData` also returns the same object.

- Added `renderError (jsx|string|function)` & `onError`
    
## Search Components
- Merge pull request ( cherry-pick ) #530 
- renderSuggestion ( to modify the suggestions, rename the old `onSuggestion` )
- renderAllSuggestion ( Rename `renderSuggestions` )
- onSuggestions
- Added `renderError (jsx|string|function)` & `onError`

## List Components
- Change `renderListItem` to `renderItem`
- Provide `isChecked` property in `renderItem` as a third argument.

```js
renderItem(item.key, item.doc_count, isChecked)
```
- Added `renderError (jsx|string|function)` & `onError`

## Base Components
 ### Reactive Component
  - now supports `onError` 
  - provides `error` & `isLoading` in props.

### Tag Cloud
- Added `renderError (jsx|string|function)` & `onError`
lakhansamani pushed a commit that referenced this pull request Apr 8, 2019
This PR has the following features/changes :

## Result Components
- Rename `onData` & `onAllData` to `renderData` & `renderAllData` respectively.
- Added `onData` prop callback invoked after data changes, which returns an object with the following properties:

```js
         {
                 results,
            
                 streamResults,
            
                 loadMore,
            
                 base,
            
                 triggerClickAnalytics,
            
            }

```
- `renderAllData` also returns the same object.

- Added `renderError (jsx|string|function)` & `onError`
    
## Search Components
- Merge pull request ( cherry-pick ) #530 
- renderSuggestion ( to modify the suggestions, rename the old `onSuggestion` )
- renderAllSuggestion ( Rename `renderSuggestions` )
- onSuggestions
- Added `renderError (jsx|string|function)` & `onError`

## List Components
- Change `renderListItem` to `renderItem`
- Provide `isChecked` property in `renderItem` as a third argument.

```js
renderItem(item.key, item.doc_count, isChecked)
```
- Added `renderError (jsx|string|function)` & `onError`

## Base Components
 ### Reactive Component
  - now supports `onError` 
  - provides `error` & `isLoading` in props.

### Tag Cloud
- Added `renderError (jsx|string|function)` & `onError`
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

3 participants