Skip to content

Commit

Permalink
chore(tag-table): fix typo slected -> selected (Joxit#317)
Browse files Browse the repository at this point in the history
  • Loading branch information
Vulwsztyn authored May 31, 2023
1 parent b660442 commit d2e6cdc
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/components/tag-list/tag-table.riot
Original file line number Diff line number Diff line change
Expand Up @@ -183,31 +183,31 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
this.update({
multiDelete: true,
toDelete: this.state.toDelete,
slectedImage: undefined,
selectedImage: undefined,
});
} else {
this.update({
multiDelete: event.target.checked,
slectedImage: undefined,
selectedImage: undefined,
});
}
},
onRemoveImageChange(action, image, shiftKey) {
let confirmDeleteImage = false;
let singleDeleteAction = false;
let slectedImage = undefined;
let selectedImage = undefined;
switch (action) {
case ACTION_CHECK_TO_DELETE: {
this.state.toDelete.add(image);
if (shiftKey) {
slectedImage = this.supportShiftKey(image, true);
selectedImage = this.supportShiftKey(image, true);
}
break;
}
case ACTION_UNCHECK_TO_DELETE: {
this.state.toDelete.delete(image);
if (shiftKey) {
slectedImage = this.supportShiftKey(image, false);
selectedImage = this.supportShiftKey(image, false);
}
break;
}
Expand All @@ -222,18 +222,18 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
toDelete: this.state.toDelete,
confirmDeleteImage,
singleDeleteAction,
slectedImage,
selectedImage,
});
},
supportShiftKey(selectedImage, addOrRemove) {
if (!this.state.slectedImage) {
if (!this.state.selectedImage) {
return selectedImage;
} else {
let shouldChange = false;
const tags = getPage(this.props.tags, this.props.page);
tags
.filter((image) => {
if (image == this.state.slectedImage || image == selectedImage) {
if (image == this.state.selectedImage || image == selectedImage) {
shouldChange = !shouldChange;
return true;
}
Expand Down

0 comments on commit d2e6cdc

Please sign in to comment.