Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

feat: add transformItems to all widgets #66

Merged
merged 6 commits into from
Aug 13, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions content/widgets/breadcrumb.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,6 @@ options:
description: Separator used in the attributes to separate level values
- name: rootPath
description: Prefix path to use if the first level is not the root level.
- name: transformItems
description: Function which receives the items, which will be called before displaying them. Should return a new array with the same shape as the original array. Useful for mapping over the items to transform, remove or reorder them
---
2 changes: 2 additions & 0 deletions content/widgets/clear-refinements.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,6 @@ options:
- name: clearsQuery
default: false
description: Also clears the query
- name: transformItems
description: Function which receives the items, which will be called before displaying them. Should return a new array with the same shape as the original array. Useful for mapping over the items to transform, remove or reorder them
---
2 changes: 2 additions & 0 deletions content/widgets/current-refinements.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,6 @@ options:
- name: clearsQuery
default: false
description: The clear all button also clears the query
- name: transformItems
description: Function which receives the items, which will be called before displaying them. Should return a new array with the same shape as the original array. Useful for mapping over the items to transform, remove or reorder them
---
2 changes: 2 additions & 0 deletions content/widgets/geo-search.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,6 @@ options:
description: Maximum radius to search around the position
- name: precision
description: Precision of geo search
- name: transformItems
description: Function which receives the items, which will be called before displaying them. Should return a new array with the same shape as the original array. Useful for mapping over the items to transform, remove or reorder them
---
2 changes: 2 additions & 0 deletions content/widgets/hierarchical-menu.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,4 +168,6 @@ options:
description: Show the siblings of the selected parent level of the current refined value. This does not impact the root level.
- name: sortBy
description: array or function to sort the results by
- name: transformItems
description: Function which receives the items, which will be called before displaying them. Should return a new array with the same shape as the original array. Useful for mapping over the items to transform, remove or reorder them
---
2 changes: 2 additions & 0 deletions content/widgets/hits-per-page.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,6 @@ classes:
options:
- name: items
description: Array of objects with the value, the label and a boolean "default" which decides which item to select by default
- name: transformItems
description: Function which receives the items, which will be called before displaying them. Should return a new array with the same shape as the original array. Useful for mapping over the items to transform, remove or reorder them
---
3 changes: 3 additions & 0 deletions content/widgets/hits.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,7 @@ classes:
description: the list of results
- name: .ais-Hits-item
description: the hit list item
options:
- name: transformItems
description: Function which receives the items, which will be called before displaying them. Should return a new array with the same shape as the original array. Useful for mapping over the items to transform, remove or reorder them
---
3 changes: 3 additions & 0 deletions content/widgets/infinite-hits.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,7 @@ classes:
description: the button used to display more results
- name: .ais-InfiniteHits-loadMore--disabled
description: the disabled button used to display more results
options:
- name: transformItems
description: Function which receives the items, which will be called before displaying them. Should return a new array with the same shape as the original array. Useful for mapping over the items to transform, remove or reorder them
---
2 changes: 2 additions & 0 deletions content/widgets/menu-select.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,6 @@ options:
description: Number of items to show
- name: sortBy
description: array or function to sort the results by
- name: transformItems
description: Function which receives the items, which will be called before displaying them. Should return a new array with the same shape as the original array. Useful for mapping over the items to transform, remove or reorder them
---
2 changes: 2 additions & 0 deletions content/widgets/menu.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,4 +127,6 @@ options:
description: Whether or not to have the option to load more values
- name: sortBy
description: array or function to sort the results by
- name: transformItems
description: Function which receives the items, which will be called before displaying them. Should return a new array with the same shape as the original array. Useful for mapping over the items to transform, remove or reorder them
---
2 changes: 2 additions & 0 deletions content/widgets/numeric-menu.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,6 @@ options:
description: Attribute to apply the filter to
- name: items
description: Array of objects with a label, start and end value. Start and end can individually be left as undefined to only apply a single bound
- name: transformItems
description: Function which receives the items, which will be called before displaying them. Should return a new array with the same shape as the original array. Useful for mapping over the items to transform, remove or reorder them
---
3 changes: 3 additions & 0 deletions content/widgets/numeric-selector.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,7 @@ classes:
description: the select
- name: .ais-NumericSelector-option
description: the select options
options:
- name: transformItems
description: Function which receives the items, which will be called before displaying them. Should return a new array with the same shape as the original array. Useful for mapping over the items to transform, remove or reorder them
---
2 changes: 2 additions & 0 deletions content/widgets/pagination.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,6 @@ options:
- name: showPrevious
default: true
description: Whether to show the "previous page" control
- name: transformItems
description: Function which receives the items, which will be called before displaying them. Should return a new array with the same shape as the original array. Useful for mapping over the items to transform, remove or reorder them
---
2 changes: 2 additions & 0 deletions content/widgets/rating-menu.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,6 @@ options:
description: Attribute to apply the filter to
- name: max
description: Maximum number of (stars) to display
- name: transformItems
description: Function which receives the items, which will be called before displaying them. Should return a new array with the same shape as the original array. Useful for mapping over the items to transform, remove or reorder them
---
2 changes: 2 additions & 0 deletions content/widgets/refinement-list.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,4 +136,6 @@ options:
description: Whether or not to have the option to load more values
- name: sortBy
description: array or function to sort the results by
- name: transformItems
description: Function which receives the items, which will be called before displaying them. Should return a new array with the same shape as the original array. Useful for mapping over the items to transform, remove or reorder them
---
2 changes: 2 additions & 0 deletions content/widgets/sort-by.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,6 @@ classes:
options:
- name: items
description: Array of objects with value (the index to search on) and a label
- name: transformItems
description: Function which receives the items, which will be called before displaying them. Should return a new array with the same shape as the original array. Useful for mapping over the items to transform, remove or reorder them
---
3 changes: 3 additions & 0 deletions content/widgets/stats.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,7 @@ classes:
- name: .ais-Stats-text
description: the text of the widget
description: the count of items for each item
options:
- name: transformItems
description: Function which receives the items, which will be called before displaying them. Should return a new array with the same shape as the original array. Useful for mapping over the items to transform, remove or reorder them
---