-
Notifications
You must be signed in to change notification settings - Fork 303
fix: Fix editing search tiles in dashboard #820
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: Fix editing search tiles in dashboard #820
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -359,12 +359,16 @@ export function SQLInlineEditorControlled({ | |||
}: Omit<SQLInlineEditorProps, 'value' | 'onChange'> & UseControllerProps<any>) { | |||
const { field } = useController(props); | |||
|
|||
// Guard against wrongly typed values | |||
const value = field.value || props.defaultValue; | |||
const stringValue = typeof value === 'string' ? value : ''; |
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.
we can merge this as-is, would it be appropriate to throw a warn here to understand when the component is being misused or is this largely doing null checks and the like?
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 is mainly for the select
field as it can be array. I added a console.error to make sure we get notified if that happens again
…hes-after-editing
Fix the issue with
select
field becoming an empty array for Search tiles.