When I sort class:selected={defaultImg === item.name} this can't figure out the actual element where the class needs to be assing to.
let defaultImg
<Sortable {items} let:item={item} on:change={onChange}>
<label class="label" class:selected={defaultImg === item.name} data-name='{item.name}'
on:dblclick={e => handleRemoveFile(e)}>
<input type='radio' name="defaultImg" bind:group={defaultImg} value='{item.name}'/>
<img class="img-fluid" src='{item.thumb}' alt='{item.name}'>
</label>
</Sortable>
When I sort
class:selected={defaultImg === item.name}this can't figure out the actual element where the class needs to be assing to.let defaultImg