Skip to content

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

Merged

Conversation

ernestii
Copy link
Contributor

Fix the issue with select field becoming an empty array for Search tiles.

Copy link

changeset-bot bot commented May 16, 2025

⚠️ No Changeset found

Latest commit: 7898f52

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented May 16, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
hyperdx-v2-oss-app ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 17, 2025 7:12pm

MikeShi42
MikeShi42 previously approved these changes May 16, 2025
@@ -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 : '';
Copy link
Contributor

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?

Copy link
Contributor Author

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

@kodiakhq kodiakhq bot merged commit a36c229 into v2 May 17, 2025
7 checks passed
@kodiakhq kodiakhq bot deleted the ernest/hdx-1716-bug-dashboard-search-tile-crashes-after-editing branch May 17, 2025 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants