Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix: display snowflake errors instead of closing modal #11009

Merged
merged 1 commit into from
Feb 21, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ export function CreateOrUpdateConnectionSnowflakeModal({
warehouse: "",
});
_onSuccess(ds);
onClose();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess here you'll want to add setIsOpen(false), no?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No actually the setIsOpen was a mistake, removed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just onClose does the trick 👍

Copy link
Contributor

@JulesBelveze JulesBelveze Feb 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, already done in onClose?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes !

}

const createSnowflakeConnection = async () => {
Expand Down Expand Up @@ -323,8 +324,8 @@ export function CreateOrUpdateConnectionSnowflakeModal({
? "Update connection"
: "Connect and select tables",
icon: CloudArrowLeftRightIcon,
onClick: () => {
setIsLoading(true);
onClick: (e: React.MouseEvent<HTMLButtonElement>) => {
e.preventDefault();
dataSourceToUpdate
? void updateSnowflakeConnection()
: void createSnowflakeConnection();
Expand Down