mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
## Summary Fixes #47410, where the map would not respond to the global refresh button when time filter is set to an absolute value. Before Fix: <img src="https://user-images.githubusercontent.com/2946766/66272255-83403280-e824-11e9-9525-5e8fdc5f9879.gif" width=300/> ##### After Fix: <img src="https://user-images.githubusercontent.com/2946766/66272238-4116f100-e824-11e9-9606-62d270c4862e.gif" width=300/> ### Checklist Use ~~strikethroughs~~ to remove checklist items you don't feel are applicable to this PR. - [x] This was checked for cross-browser compatibility, [including a check against IE11](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility) - [ ] ~Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/master/packages/kbn-i18n/README.md)~ - [ ] ~[Documentation](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#writing-documentation) was added for features that require explanation or tutorials~ - [x] [Unit or functional tests](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#cross-browser-compatibility) were updated or added to match the most common scenarios - [ ] ~This was checked for [keyboard-only and screenreader accessibility](https://developer.mozilla.org/en-US/docs/Learn/Tools_and_testing/Cross_browser_testing/Accessibility#Accessibility_testing_checklist)~ ### For maintainers - [ ] ~This was checked for breaking API changes and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)~ - [x] This includes a feature addition or change that requires a release note and was [labeled appropriately](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md#release-notes-process)
This commit is contained in:
parent
2d04d700a1
commit
1f5eee36d8
2 changed files with 9 additions and 1 deletions
|
@ -66,5 +66,13 @@ describe('embedded_map_helpers', () => {
|
|||
await createEmbeddable([], '', 0, 0, setQueryMock);
|
||||
expect(setQueryMock).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
|
||||
test('attaches refresh action with correct reference', async () => {
|
||||
const setQueryMock = jest.fn(({ id, inspect, loading, refetch }) => refetch);
|
||||
const embeddable = await createEmbeddable([], '', 0, 0, setQueryMock);
|
||||
expect(setQueryMock.mock.calls[0][0].refetch).not.toBe(embeddable.reload);
|
||||
setQueryMock.mock.results[0].value();
|
||||
expect(embeddable.reload).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -128,7 +128,7 @@ export const createEmbeddable = async (
|
|||
id: 'embeddedMap', // Scope to page type if using map elsewhere
|
||||
inspect: null,
|
||||
loading: false,
|
||||
refetch: embeddableObject.reload,
|
||||
refetch: () => embeddableObject.reload(),
|
||||
});
|
||||
|
||||
return embeddableObject;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue