Hi!
Just started using the package and seems there is no way of tracking the state of booked objects somewhere in the parent component. The basic use case would be to prevent the user from going to the next step of the flow:
const [bookedObjects, setBookedObjects] = useState([])
<SeatsioSeatingChart
....
/>
<button onClick={goNext} disabled={bookedObjects.length === 0}>Go to the next step</button>
EDIT:
I've found out about this solution which is to use onObjectSelected and onObjectDeselected. This solves my issue but I was rather thinking about something like onSelectedObjectsChange which would not require me to implement this two functions above.
Hi! Just started using the package and seems there is no way of tracking the state of booked objects somewhere in the parent component. The basic use case would be to prevent the user from going to the next step of the flow:
EDIT:
I've found out about this solution which is to use
onObjectSelected
andonObjectDeselected
. This solves my issue but I was rather thinking about something likeonSelectedObjectsChange
which would not require me to implement this two functions above.