# j-Extend

> Този компонент е специфичен компонент с мощна функционалност. Когато компонентът се оценява, той изпълнява два събития в формата по-долу.

Framework: jcomponent20
Product: jComponent 20 (jcomponent@20)
Language: bg
Content-SHA256: 2f224b7dba3a0883399779c0c22ad1ef7f53ecda591b7ac5a6786d39d8198ed7
Snapshot: c0700e321579725c5cf4f5ace1ad7d2866d1b4f93c24a63c0b41b6b7998e976c
Sources: components@910ed1a86f6e72b4f031d3ad0dc7844f9fc5cb8e
Review: not-recorded

Този компонент е специфичен компонент с мощна функционалност. Когато компонентът се оценява, той изпълнява два събития в формата по-долу.

__Конфигуриране__:

- `name {String}` Името за разширяване, компонентът ще емитира събитие `ON('extend_' + name)`

Компонентът издава само два събития, които можете да уловите някъде:

```js
// NAME: is defined in the component configuration
ON('extend_NAME', function(opt) {
	// opt.name {String} with a value according to the "config.name"
	// opt.component {Instance of j-Extend}
	// opt.element {jQuery element}
	// opt.dom {Node}
});

ON('extend', function(opt) {
	// opt.name {String} with a value according to the "config.name"
	// opt.component {Instance of j-Extend}
	// opt.element {jQuery element}
	// opt.dom {Node}
});
```

Използвайте го с `<ui-component name="extend">`Когато компонентът все още не е зареден, jComponent Изтегляне на първия адрес в `DEF.fallback` (След това Componentator Източник: Пит Шърка Componentator Съставни съставки, лиценз на MIT.

```html example.html
<div style="width:300px">
	<ui-plugin path="form">
		<ui-component name="extend" config="name:test"></ui-component>
	</ui-plugin>
</div>

<script>
	ON('extend_test', function(opt) {
		// Here you can use IMPORT() method
		opt.element.append(`
			<div class="m">Extended:</div>
			<ui-component name="input" path="?.name" config="required:1">Label</ui-component>
		`);
	});
</script>
```
