You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Component that wraps the bucket aggregations and renders a title and the container of aggregations.
78
+
79
+
***title**`String`
80
+
81
+
The title to render.
82
+
83
+
***containerCmp**`React component`
84
+
85
+
The `BucketAggregationContainer` to render.
86
+
87
+
***agg**`Object`
88
+
89
+
Same object as in the props.
90
+
91
+
***updateQueryFilters**`Function`
92
+
93
+
A function to call to update the current selected filters.
94
+
95
+
### BucketAggregationContainer parameters
96
+
97
+
Component that wraps the list of aggregations.
75
98
76
99
***valuesCmp**`React component`
77
100
78
-
Component to render each of the aggregation values.
101
+
List of components of each aggregation value.
79
102
80
-
```jsx
81
-
constcustomAggValueCmp= (
82
-
bucket,
83
-
isSelected,
84
-
onFilterClicked,
85
-
getChildAggCmps
86
-
) => {
87
-
constchildAggCmps=getChildAggCmps(bucket);
88
-
return (
89
-
<Menu.Item
90
-
key={bucket.key}
91
-
name={bucket.key}
92
-
active={isSelected}
93
-
onClick={() =>onFilterClicked(bucket.key)}
94
-
>
95
-
<Label>{bucket.doc_count}</Label>
96
-
{bucket.key}
97
-
{childAggCmps}
98
-
</Menu.Item>
99
-
);
100
-
};
101
-
```
103
+
### BucketAggregationValues parameters
102
104
103
-
### renderValueElement parameters
105
+
Component that renders each of the aggregation.
104
106
105
-
***bucket**`array`
107
+
***bucket**`Array`
106
108
107
109
The bucket to display, which by default contains the `key` field with the value and the `doc_count` number.
108
110
109
-
***isSelected**`boolean`
111
+
***label**`String`
112
+
113
+
The label to display.
114
+
115
+
***isSelected**`Boolean`
110
116
111
117
`true` if this value is active/selected, `false` otherwise.
112
118
113
-
***onFilterClicked**`function`
119
+
***onFilterClicked**`Function`
114
120
115
121
The function to be called when the user click on this value to activate the filter. It should be called with the `bucket.key` parameter.
116
122
117
-
***getChildAggCmps**`function`
123
+
***getChildAggCmps**`Function`
118
124
119
125
A function to be called to render child component. It accepts the current `bucket` as parameter and it will render recursively this component. It returns a list of child components.
0 commit comments