From 7fd6d5d21b096c828cbc6d7d1c277e71d06e0481 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Levent=20Arman=20=C3=96zak?= Date: Wed, 1 Jul 2020 15:08:40 +0300 Subject: [PATCH] docs: describe how order numbers work --- docs/en/UI/Angular/Modifying-the-Menu.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/en/UI/Angular/Modifying-the-Menu.md b/docs/en/UI/Angular/Modifying-the-Menu.md index f728fb2f9a..a3c356891e 100644 --- a/docs/en/UI/Angular/Modifying-the-Menu.md +++ b/docs/en/UI/Angular/Modifying-the-Menu.md @@ -239,7 +239,7 @@ export class AppComponent { id: 'SignOutIcon', html: '', action: () => console.log('Clicked the sign out icon'), - order: 102, // puts as last element + order: 101, // puts as last element }, ]); } @@ -250,6 +250,8 @@ This inserts a search input and a sign out icon to the menu. The final UI looks ![navigation-menu-search-input](./images/navigation-menu-search-input.png) +> The default elements have an order of `100`. If you want to place a custom element before the defaults, assign an order number up to `99`. If you want to place a custom element after the defaults, assign orders starting from `101`. Finally, if you must place an item between the defaults, patch the default element orders as described below. A warning though: We may add another default element in the future and it too will have an order number of `100`. + ## How to Patch or Remove an Right Part Element The `patchItem` method of `NavItemsService` finds an element by its `id` property and replaces its configuration with the new configuration passed as the second parameter. Similarly, `removeItem` method finds an element and removes it.