You need to sign in to do that
Don't have an account?

How can I get the boolean value of my checkbox in lightning datatable?
I would like to know how to take the boolean value at the click of the lightning datatable checkbox in order to check to create a sort of product counter in mode that increases when the product is selected and descriptions when the product has been removed
I have a Lightning: datatable which fetches the records of my products through an Apex class, when I generate my datatable, "checkboxes" appear that I need to select individual products to add them via a Lightning: button in a new one datatable. I created a new button that represents my cart. Inside the button there is an aura attribute "counter" which my intent is to increase or decrease it when selecting or removing the product in the cart. I would like to know which control to apply to make this automatism work.
Component:
Controller:
as you can see below there is a lightning: button that marks the numbers of the selected books, unfortunately I don't know how to decrease that number when removing the selected book