From 1879caaa00fc364a5bc271c370bbf4a598ff6fcf Mon Sep 17 00:00:00 2001 From: Ivan Deskov Date: Sun, 24 May 2020 21:12:06 +0100 Subject: [PATCH] Only handle onclick in the button instead of stopping propagation --- app/src/static/js/app.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/src/static/js/app.js b/app/src/static/js/app.js index 9947dd6..4ec962c 100644 --- a/app/src/static/js/app.js +++ b/app/src/static/js/app.js @@ -117,8 +117,7 @@ function AddItemForm({ onNewItem }) { function ItemDisplay({ item, onItemUpdate, onItemRemoval }) { const { Container, Row, Col, Button } = ReactBootstrap; - const toggleCompletion = (event) => { - event.stopPropagation() + const toggleCompletion = () => { fetch(`/items/${item.id}`, { method: 'PUT', body: JSON.stringify({ @@ -153,7 +152,6 @@ function ItemDisplay({ item, onItemUpdate, onItemRemoval }) { } >