select-item
Description
Fires when an item is selected
Usage
"select-item": ({
id: string|number
}) => void;
Parameters
The callback of the select-item event can take an object with the following parameters:
id
- (required) the id of an item
Example
// create Booking
const booking = new booking.Booking("#root", {
data,
// other configuration parameters
});
// output the id of the selected item
booking.api.on("select-item", (ev) => {
console.log(ev.id);
});