fix Svelte 5 event modifier syntax in selectable components

Replace deprecated onclick|stopPropagation with onclick={(e) => e.stopPropagation()}
This commit is contained in:
Justin Edmund 2025-12-03 07:31:32 -08:00
parent d11362ff57
commit d9dd8f58ee
4 changed files with 6 additions and 4 deletions

View file

@ -54,7 +54,7 @@
aria-label="Select {name}, current quantity: {quantity}"
>
<img src={imageUrl} alt={name} class="image" loading="lazy" />
<div class="counter-overlay" onclick|stopPropagation={() => {}}>
<div class="counter-overlay" onclick={(e) => e.stopPropagation()}>
<QuantityCounter value={quantity} onChange={handleQuantityChange} />
</div>
</div>

View file

@ -56,7 +56,8 @@
onkeydown={handleKeyDown}
aria-label="Select {name}, current quantity: {quantity}"
>
<div class="counter-cell" onclick|stopPropagation={() => {}}>
<!-- onclick stops propagation to prevent row click from firing -->
<div class="counter-cell" onclick={(e) => e.stopPropagation()}>
<QuantityCounter value={quantity} onChange={handleQuantityChange} />
</div>

View file

@ -54,7 +54,7 @@
aria-label="Select {name}, current quantity: {quantity}"
>
<img src={imageUrl} alt={name} class="image" loading="lazy" />
<div class="counter-overlay" onclick|stopPropagation={() => {}}>
<div class="counter-overlay" onclick={(e) => e.stopPropagation()}>
<QuantityCounter value={quantity} onChange={handleQuantityChange} />
</div>
</div>

View file

@ -56,7 +56,8 @@
onkeydown={handleKeyDown}
aria-label="Select {name}, current quantity: {quantity}"
>
<div class="counter-cell" onclick|stopPropagation={() => {}}>
<!-- onclick stops propagation to prevent row click from firing -->
<div class="counter-cell" onclick={(e) => e.stopPropagation()}>
<QuantityCounter value={quantity} onChange={handleQuantityChange} />
</div>