ResultsGrid
ResultsGrid renders the list of results as a grid.
Usage
<ResultsGrid resultsPerRow={5} />
Props
resultsPerRow
intoptionalThe number of results to display in each row. Default value:
3.overridableId
StringoptionalAn optional string to define a specific overridable id.
onResultsRendered
funcoptionalAn optional function to define set of actions to be performed after the component is rendered. For example: render MathJax to display mathematical equations.
Usage when overriding
const MyResultsGridContainer = ({ results, resultsPerRow }) => {
...
}
const MyResultsGridItem = ({ results, resultsPerRow }) => {
...
}
const overriddenComponents = {
"ResultsGrid.container": MyResultsGridContainer
"ResultsGrid.item": MyResultsGridItem
};
ResultsGridContainer parameters
Component that wraps the grid of result's items.
results
ArrayThe list of results to display to the user.
resultsPerRow
NumberThe prop
resultsPerRowdefined when using the component.
ResultsGridItem parameters
Component that will render a specicif result item.
result
ObjectThe result object to render.
index
NumberThe index number of the result object.