mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
Migrates search example mountReactNode to kibana-react
toMountPoint (#137633)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
parent
fb9ae97a23
commit
44738f2439
2 changed files with 8 additions and 5 deletions
|
@ -1,7 +1,10 @@
|
|||
# search_examples
|
||||
|
||||
> An awesome Kibana plugin
|
||||
|
||||
Small demos of search functionality.
|
||||
|
||||
To run this example, ensure you have data to search against (for example, the sample datasets) and start kibana with the `--run-examples` flag.
|
||||
|
||||
---
|
||||
|
||||
## Development
|
||||
|
|
|
@ -34,7 +34,7 @@ import {
|
|||
|
||||
import { lastValueFrom } from 'rxjs';
|
||||
import { CoreStart } from '@kbn/core/public';
|
||||
import { mountReactNode } from '@kbn/core/public/utils';
|
||||
import { toMountPoint } from '@kbn/kibana-react-plugin/public';
|
||||
import { NavigationPublicPluginStart } from '@kbn/navigation-plugin/public';
|
||||
|
||||
import {
|
||||
|
@ -232,7 +232,7 @@ export const SearchExamplesApp = ({
|
|||
notifications.toasts.addSuccess(
|
||||
{
|
||||
title: 'Query result',
|
||||
text: mountReactNode(message),
|
||||
text: toMountPoint(message),
|
||||
},
|
||||
{
|
||||
toastLifeTimeMs: 300000,
|
||||
|
@ -241,7 +241,7 @@ export const SearchExamplesApp = ({
|
|||
if (res.warning) {
|
||||
notifications.toasts.addWarning({
|
||||
title: 'Warning',
|
||||
text: mountReactNode(res.warning),
|
||||
text: toMountPoint(res.warning),
|
||||
});
|
||||
}
|
||||
} else if (isErrorResponse(res)) {
|
||||
|
@ -315,7 +315,7 @@ export const SearchExamplesApp = ({
|
|||
notifications.toasts.addSuccess(
|
||||
{
|
||||
title: 'Query result',
|
||||
text: mountReactNode(message),
|
||||
text: toMountPoint(message),
|
||||
},
|
||||
{
|
||||
toastLifeTimeMs: 300000,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue