-
Notifications
You must be signed in to change notification settings - Fork 449
fix: trigger widget callback when model is selected #7304
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -150,6 +150,13 @@ const renderedRoot = computed<TreeExplorerNode<ModelOrFolder>>(() => { | |
| if (widget) { | ||
| // @ts-expect-error fixme ts strict error | ||
| widget.value = model.file_name | ||
| if (model) { | ||
| widget.callback?.(model!.file_name) | ||
| // Force the reactive widgets array to update | ||
| if (node.widgets) { | ||
| node.widgets = [...node.widgets] | ||
| } | ||
| } | ||
|
Comment on lines
151
to
+159
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick | 🔵 Trivial Model click now triggers widget callback and reactivity; consider minor TS cleanup The new block that calls Two small follow‑ups you might consider here:
Functionally this change looks good; these are purely refactoring/clean‑up suggestions. 🤖 Prompt for AI Agents |
||
| } | ||
| } | ||
| } else { | ||
|
|
||
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.
So this part won't be necessary after #7095?
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.
Yeah I'm having second thoughts about it