(cherry picked from commit b5e4a0a39a)
Co-authored-by: Giordano Ricci <me@giordanoricci.com>
This commit is contained in:
committed by
GitHub
parent
786174ce94
commit
8cfc6571d8
@@ -60,6 +60,11 @@ describe('useFields hook', () => {
|
||||
result.current();
|
||||
expect(getFields).toHaveBeenLastCalledWith(['date'], timeRange);
|
||||
|
||||
// Histrogram only works on numbers
|
||||
rerender('histogram');
|
||||
result.current();
|
||||
expect(getFields).toHaveBeenLastCalledWith(['number'], timeRange);
|
||||
|
||||
// Geohash Grid only works on geo_point data
|
||||
rerender('geohash_grid');
|
||||
result.current();
|
||||
|
||||
@@ -33,6 +33,8 @@ const getFilter = (type: AggregationType) => {
|
||||
return ['date'];
|
||||
case 'geohash_grid':
|
||||
return ['geo_point'];
|
||||
case 'histogram':
|
||||
return ['number'];
|
||||
default:
|
||||
return [];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user