# j-Empty

> j-Empty: NOWY czek {Boolean} czeka na dane (default: fałszywe)

Framework: jcomponent20
Product: jComponent 20 (jcomponent@20)
Language: pl
Content-SHA256: 61f0ba6b98a699e1ac0d82600336e871049f0cc23eea527035172d8fb7423e29
Snapshot: c0700e321579725c5cf4f5ace1ad7d2866d1b4f93c24a63c0b41b6b7998e976c
Sources: components@910ed1a86f6e72b4f031d3ad0dc7844f9fc5cb8e
Review: not-recorded

- `path` musi zawierać źródło danych, które będzie monitorowane

__Konfiguracja__:

- `icon {String}` jako ikona domyślna (default: `ti ti-database`)
- `parent {String}` to rodzinny pojemnik, który ustala minimalną wysokość (default: `parent`)
- Wysokość `height {Number}` (jeśli nie chcesz używać `parent`, domyślnie: `undefined`)
- `margin {Number}` na margines (default: `0`)
- `topoffset {Boolean}` stosuje `element.offset().top` jako marżę (default: `false`)
- `topposition {Boolean}` stosuje `element.position().top` jako marżę (default: `false`)
- __NEW__ `wait {Boolean}` czeka na dane (default: `false`)

__Przypadek 1__:

```html
<ui-component name="empty" path="datasource" class="hidden">
	Items not found
</ui-component>
<ui-bind path="datasource" config="show:value && value.length" class="hidden"></ui-bind>
```

__Przypadek użycia 2__:

```html
<ui-component name="empty" path="datasource" class="hidden">
	<script type="text/html">
		Items not found
	</script>
	<div>
		YOUR CONTENT. This DIV will be hidden automatically if the "datasource" is empty.
	</div>
</ui-component
```

Użyj go z `<ui-component name="empty">`Gdy element nie jest jeszcze ładowany, jComponent Pobierz go po pierwszym użyciu z adresu `DEF.fallback` (Wydaje się Componentator Autor: Peter Širka Źródło: Componentator Zestaw składników, licencja MIT.

```html example.html
<ui-component name="empty" path="datasource" config="parent:window;wait:false" class="hidden">The datasource is empty.</ui-component>

<script>

	var datasource = [];

	// Empty component will be hidden after 5 seconds
	PUSH('datasource', { item: 1 }, 5000);

</script>
```
