Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(editor): Fix issue with case insensitive tags #9071

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion cypress/e2e/17-workflow-tags.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ describe('Workflow tags', () => {
wf.actions.addTags(TEST_TAGS.slice(0, 2));
wf.getters.tagPills().should('have.length', 2);
wf.getters.nthTagPill(1).click();
wf.actions.addTags(TEST_TAGS[2]);
wf.actions.addTags(TEST_TAGS[1].toUpperCase());
wf.getters.tagPills().should('have.length', 3);
wf.getters.isWorkflowSaved();
});
Expand Down
6 changes: 2 additions & 4 deletions packages/editor-ui/src/components/TagsDropdown.vue
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,7 @@ export default defineComponent({
});

const options = computed<ITag[]>(() => {
return allTags.value.filter(
(tag: ITag) => tag && tag.name.toLowerCase().includes(filter.value.toLowerCase()),
);
return allTags.value.filter((tag: ITag) => tag && tag.name.includes(filter.value));
});

const appliedTags = computed<string[]>(() => {
Expand Down Expand Up @@ -182,7 +180,7 @@ export default defineComponent({
}

function filterOptions(value = '') {
filter.value = value.trim();
filter.value = value;
void nextTick(() => focusFirstOption());
}

Expand Down