Skip to content
This repository was archived by the owner on Nov 19, 2024. It is now read-only.

Commit 35986fb

Browse files
Merge pull request #8383 from chiranjeevi-cj/7656-asynchronous-variant-for-uiregistry-component
Added the asynchronous way of retrieving ui components from the registry
2 parents d3ebe94 + 73e008d commit 35986fb

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/guides/v2.3/ui_comp_guide/concepts/ui_comp_uiregistry.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,18 @@ To get a list of all components used on the current page, you can use this code:
3737
require('uiRegistry').get(function(component){console.log(component.name)});
3838
```
3939

40+
### Asynchronous method of retrieving UI components from the registry
41+
42+
{:.bs-callout-info}
43+
This is the **recommended** method for best performance.
44+
45+
```js
46+
module('trigger', true);
47+
var component = () => registry.get('componentName', function (component) {
48+
component.trigger(true);
49+
});
50+
```
51+
4052
**Examples:**
4153

4254
The following code shows how to get a component by a full component name:

0 commit comments

Comments
 (0)