-
Notifications
You must be signed in to change notification settings - Fork 224
fix: allow typing in relationship input field #2943
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
base: main
Are you sure you want to change the base?
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 |
|---|---|---|
|
|
@@ -11,14 +11,7 @@ | |
| export let placeholder = ''; | ||
| export let required = false; | ||
| export let disabled = false; | ||
| export let options: { | ||
| value: string | boolean | number | null; | ||
| label: string; | ||
| disabled?: boolean; | ||
| leadingIcon?: ComponentType; | ||
| leadingHtml?: string; | ||
| badge?: string; | ||
| }[]; | ||
|
|
||
| export let leadingIcon: ComponentType | undefined = undefined; | ||
|
|
||
| let error: string; | ||
|
|
@@ -44,22 +37,19 @@ | |
| } | ||
| </script> | ||
|
|
||
| <Input.Select | ||
| {id} | ||
| {label} | ||
| {options} | ||
| {optionalText} | ||
| {placeholder} | ||
| {disabled} | ||
| {autofocus} | ||
| {leadingIcon} | ||
| helper={error ?? helper} | ||
| {required} | ||
| state={error ? 'error' : 'default'} | ||
| data-command-center-ignore | ||
| on:invalid={handleInvalid} | ||
| on:input | ||
| on:change | ||
| bind:value> | ||
| <Input | ||
| {id} | ||
| {label} | ||
| {placeholder} | ||
| {disabled} | ||
| {autofocus} | ||
| {leadingIcon} | ||
| helper={error ?? helper} | ||
| {required} | ||
| state={error ? 'error' : 'default'} | ||
| data-command-center-ignore | ||
| on:invalid={handleInvalid} | ||
| on:input={(e) => value = e.target.value} | ||
|
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. |
||
| bind:value> | ||
| <slot name="info" slot="info" /> | ||
|
Comment on lines
+40
to
54
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.
The |
||
| </Input.Select> | ||
| </Input> | ||
|
Comment on lines
+40
to
+55
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.
Affected components (non-exhaustive):
The intent of this PR (restoring typing ability in the relationship field) is valid, but it should target only the relevant relationship input rather than changing this shared wrapper component. The fix should be applied directly in
Comment on lines
+40
to
+55
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.
Line 10 still exposes 🤖 Prompt for AI AgentsDon't convert the shared select wrapper into a plain text input.
🤖 Prompt for AI Agents |
||
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.
on:changeno longer forwarded — breaks all callers that depend on itThe original component forwarded
on:changeto parent components. This PR removes that forwarding and only handleson:inputinternally. All existing callers that passon:changehandlers will receive no event.For example, in
relationship.svelte:These handlers won't fire, so
relatedListandvaluewill never be updated when the user selects/types a value.Also in
lib/components/limit.svelte:The row limit change callback will be silently dropped.
The
on:changeevent should be forwarded alongsideon:input: