|
|
## Events
|
|
|
|
|
|
As the framework has its own specificities, here are some useful functions :
|
|
|
|
|
|
As the framework has its own specificities, here are some useful event :
|
|
|
|
|
|
| Event name | Fired by | Fired when |
|
|
|
| ---------------- | ---------------------------------------------------- | --------------------------------------------------------------------------------- |
|
|
|
| `resourceSelect` | `sib-display`, `sib-calendar`, `sib-map` | the user clicks an child in the list, with the resource as a detail of the event. |
|
|
|
| `populate` | `sib-display`, `sib-form`, `sib-calendar`, `sib-map` | the component got and displayed all its datas. |
|
|
|
| `save` | `sib-form` | the user validates the form. | |
|
|
\ No newline at end of file |
|
|
| `resourceSelect` | `sib-display`, `sib-calendar`, `sib-map` | The user clicks an child in the list, with the resource as a detail of the event. |
|
|
|
| `populate` | `sib-display`, `sib-form`, `sib-calendar`, `sib-map` | The component got and displayed all its datas. |
|
|
|
| `save` | `sib-form` | The user validates the form. |
|
|
|
|
|
|
### Examples
|
|
|
|
|
|
#### Populate
|
|
|
|
|
|
```js
|
|
|
element.addEventListener("populate", event => {
|
|
|
// Do something when the element is generated.
|
|
|
})
|
|
|
```
|
|
|
|
|
|
#### Save
|
|
|
|
|
|
```js
|
|
|
form.addEventListener("save", () => {
|
|
|
// Do something when the user validates the form.
|
|
|
});
|
|
|
|
|
|
```
|
|
|
|