diff --git a/client/src/linkManager.js b/client/src/linkManager.js index f9f49299ae..0b2e475921 100644 --- a/client/src/linkManager.js +++ b/client/src/linkManager.js @@ -352,9 +352,9 @@ export class linkManager extends LuigiClientBase { } /** - * Disables the navigation handling for a single navigation request - * It prevents Luigi Core from handling url change after `navigate()`. - * Used for auto-navigation + * Disables the navigation handling for a single navigation request. + * It prevents Luigi Core from handling the URL change after `navigate()`. + * Used for auto-navigation. * @since 0.7.7 * @example * LuigiClient.linkManager().withoutSync().navigate('/projects/xy/foobar'); diff --git a/client/src/uxManager.js b/client/src/uxManager.js index a11d0c2673..9521e24628 100644 --- a/client/src/uxManager.js +++ b/client/src/uxManager.js @@ -57,7 +57,7 @@ class UxManager extends LuigiClientBase { helpers.sendPostMessageToLuigiCore({ msg: 'luigi.remove-backdrop' }); } /** - * This method informs the main application that there are unsaved changes in the current view in the iframe. It can be used to prevent navigation away from the current view, for example with form fields which were edited but not submitted. However, this functionality is not restricted to forms. + * This method informs the main application that there are unsaved changes in the current view in the iframe. It can be used to prevent navigation away from the current view, for example with form fields which were edited but not submitted. However, this functionality is not restricted to forms. If you use `withoutSync()` together with `setDirtyStatus()`, this is a special case in which the dirty state logic needs to be handled by the micro frontend. For example, if the user navigates with an Angular router, which would trigger `withoutSync()`, Angular needs to take care about dirty state, prevent the navigation and ask for permission to navigate away, through `uxManager().showConfirmationModal(settings)`. * @param {boolean} isDirty indicates if there are any unsaved changes on the current page or in the component * @memberof uxManager */ diff --git a/docs/luigi-client-api.md b/docs/luigi-client-api.md index f66f80ecfb..a71faa9be4 100644 --- a/docs/luigi-client-api.md +++ b/docs/luigi-client-api.md @@ -243,7 +243,7 @@ Sets node parameters in Luigi Core. The parameters will be added to the URL. ##### Parameters -- `params` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** +- `params` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** - `keepBrowserHistory` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** (optional, default `true`) ##### Examples @@ -305,7 +305,7 @@ Sends search query parameters to Luigi Core. If they are allowed on node level, ##### Parameters -- `searchParams` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** +- `searchParams` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** - `keepBrowserHistory` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** (optional, default `true`) ##### Examples @@ -438,9 +438,9 @@ LuigiClient.linkManager().navigateToIntent('Sales-settings') #### withoutSync -Disables the navigation handling for a single navigation request -It prevents Luigi Core from handling url change after `navigate()`. -Used for auto-navigation +Disables the navigation handling for a single navigation request. +It prevents Luigi Core from handling the URL change after `navigate()`. +Used for auto-navigation. ##### Examples @@ -605,7 +605,7 @@ Sets the current navigation context to that of a specific parent node which has ##### Parameters -- `navigationContext` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** +- `navigationContext` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** ##### Examples @@ -665,7 +665,7 @@ Sends node parameters to the route. The parameters are used by the `navigate` fu ##### Parameters -- `nodeParams` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** +- `nodeParams` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** ##### Examples @@ -723,8 +723,8 @@ LuigiClient.linkManager().goBack(true); ### splitView -Split view -Allows to open a micro frontend in a split screen in the lower part of the content area. Open it by calling `const splitViewHandle = LuigiClient.linkManager().openAsSplitView`. +Split view +Allows to open a micro frontend in a split screen in the lower part of the content area. Open it by calling `const splitViewHandle = LuigiClient.linkManager().openAsSplitView`. At a given time, you can open only one split view. It closes automatically when you navigate to a different route. When you call `handle.collapse()`, the split view gets destroyed. It recreates when you use `handle.expand()`. `openAsSplitView` returns an instance of the split view handle. The functions, actions, and event handlers listed below allow you to control and manage the split view. @@ -926,8 +926,9 @@ Removes the backdrop. #### setDirtyStatus -This method informs the main application that there are unsaved changes in the current view in the iframe. It can be used to prevent navigation away from the current view, for example with form fields which were edited but not submitted. However, this functionality is not restricted to forms. +This method informs the main application that there are unsaved changes in the current view of the iframe. It can be used to prevent navigation away from the current view, for example with form fields which were edited but not submitted. However, this functionality is not restricted to forms. +If you use `withoutSync()` together with `setDirtyStatus()`, this is a special case in which the dirty state logic needs to be handled by the micro frontend. For example, if the user navigates with an Angular router, which would trigger `withoutSync()`, Angular needs to take care about dirty state, prevent the navigation and ask for permission to navigate away, through `uxManager().showConfirmationModal(settings)`. ##### Parameters - `isDirty` **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** indicates if there are any unsaved changes on the current page or in the component