-
Jean-Baptiste Pasquier authoredJean-Baptiste Pasquier authored
Events.rst 2.02 KiB
Events
Our objective is to use the minimum of javascript.
But for now, here are some events that will be useful to you.
E vent name | Par ameters | Fired by | Fired when |
---|---|---|---|
`` reso urce Sele ct`` | `` {detail :{resou rce}}`` |
sib-display ,
sib-calendar ,
sib-map
|
The user clicks an child in the list, with the resource as a detail of the event. |
po
pula
te |
`` {detail :{resou rce}}`` |
sib-display ,
sib-form ,
sib-calendar ,
sib-map
|
The component got and displayed all its datas. |
sa
ve |
`` {detail :{resou rce}}`` | sib-form |
The form has saved successfully. |
Examples
Populate
Use to do something if and when the element is generated.
element.addEventListener("populate", event => {
// Do something when the element is generated.
})
Save
Use to do something when a form is successfully saved.
form.addEventListener("save", event => {
// Do something when the form has been successfully saved.
});