-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
feat(web): create tag on the fly #14726
base: main
Are you sure you want to change the base?
feat(web): create tag on the fly #14726
Conversation
Hello, thank you for the PR. Can you help fix the e2e test? |
5fa8885
to
34197f8
Compare
let filteredOptions = $derived.by(() => { | ||
const _options = options.filter((option) => option.label.toLowerCase().includes(searchQuery.toLowerCase())); | ||
|
||
if (allowCreate && searchQuery !== '' && _options.filter((option) => option.label === searchQuery).length === 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This filter doesn't do anything does it? You only want _options.length === 0
@@ -36,6 +36,8 @@ | |||
options?: ComboBoxOption[]; | |||
selectedOption?: ComboBoxOption | undefined; | |||
placeholder?: string; | |||
allowCreate?: boolean; | |||
defaultFirstOption?: boolean; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you help put some comment of what does this props do?
@@ -50,20 +55,22 @@ | |||
<FullScreenModal title={$t('tag_assets')} icon={mdiTag} onClose={onCancel}> | |||
<div class="text-sm"> | |||
<p> | |||
<FormatMessage key="tag_not_found_question"> | |||
<!-- <FormatMessage key="tag_not_found_question"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you remove this unused code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just tested the PR and it works well.
Can you help address the comments? And what do you think about making a wrapper component for the combobox and adding specific tag creation handling in that wrapper component instead of adding those logics to the combobox?
#12179 (comment)