Skip to content

fix(workflow): use correct field ID in KB metadata filter selection#34149

Open
shawny011717 wants to merge 1 commit intolanggenius:mainfrom
shawny011717:fix/kb-metadata-field-selection
Open

fix(workflow): use correct field ID in KB metadata filter selection#34149
shawny011717 wants to merge 1 commit intolanggenius:mainfrom
shawny011717:fix/kb-metadata-field-selection

Conversation

@shawny011717
Copy link
Copy Markdown

Important

  1. Make sure you have read our contribution guidelines
  2. Ensure there is an associated issue and you have been assigned to it
  3. Use the correct syntax to link this PR: Fixes #<issue number>.

Summary

Fixes #33577.

The onClick handler in the metadata field dropdown (AddCondition component) was attached to the inner text <div> instead of the outer row <div>. This meant clicks landing on the icon, type label, or row padding did not register the intended field — the resulting mis-hit caused the UI to appear to always select the first field. Moving the handler to the row element ensures the full clickable area maps to the correct metadata item.

Screenshots

N/A (logic-only fix, no visual change)

Checklist

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues. Contribution guidelines
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.
  • I ran cd web && npx lint-staged to appease the lint gods

Move onClick handler from inner text div to the outer row div in the
metadata field dropdown. The handler was previously attached only to the
name label, causing clicks on other parts of the row (icon, type label,
padding) to not register the correct selection.

Fixes langgenius#33577.
@dosubot dosubot Bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Mar 26, 2026
@github-actions github-actions Bot added the web This relates to changes on the web. label Mar 26, 2026
@shawny011717
Copy link
Copy Markdown
Author

Gentle ping — this one's been waiting ~3 weeks for review. Happy to rebase or break it into smaller diffs if that helps. 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS This PR changes 0-9 lines, ignoring generated files. web This relates to changes on the web.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

KB metadata filtering always select first field

1 participant