Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Debugging

Terry Sutton2664865c3042
diff --git a/studio/components/interfaces/TableGridEditor/SidePanelEditor/RowEditor/DateTimeInput/DateTimeInput.tsx b/studio/components/interfaces/TableGridEditor/SidePanelEditor/RowEditor/DateTimeInput/DateTimeInput.tsx
index 0461c1abbf8..f7c0f916c28 100644
--- a/studio/components/interfaces/TableGridEditor/SidePanelEditor/RowEditor/DateTimeInput/DateTimeInput.tsx
+++ b/studio/components/interfaces/TableGridEditor/SidePanelEditor/RowEditor/DateTimeInput/DateTimeInput.tsx
@@ -20,6 +20,7 @@ const DateTimeInput: FC<Props> = ({ value, onChange, name, format, description }
const inputType = getColumnType(format)
function handleOnChange(e: any) {
+ console.log('the actual value is right', e.target.value)
const temp = e.target.value
if (temp.length === 0 && temp !== '') return
onChange(temp)
diff --git a/studio/components/interfaces/TableGridEditor/SidePanelEditor/SidePanelEditor.tsx b/studio/components/interfaces/TableGridEditor/SidePanelEditor/SidePanelEditor.tsx
index 8664cbfb1c3..d5a0867c80b 100644
--- a/studio/components/interfaces/TableGridEditor/SidePanelEditor/SidePanelEditor.tsx
+++ b/studio/components/interfaces/TableGridEditor/SidePanelEditor/SidePanelEditor.tsx
@@ -48,7 +48,6 @@ const SidePanelEditor: FC<Props> = ({
onColumnSaved = () => {},
}) => {
const { meta, ui } = useStore()
-
const [isEdited, setIsEdited] = useState<boolean>(false)
const [isClosingPanel, setIsClosingPanel] = useState<boolean>(false)
@@ -63,6 +62,7 @@ const SidePanelEditor: FC<Props> = ({
configuration: { identifiers: any; rowIdx: number },
onComplete: Function
) => {
+ console.log({ payload })
let saveRowError = false
if (isNewRecord) {
const insertQuery = new Query()
@@ -81,6 +81,8 @@ const SidePanelEditor: FC<Props> = ({
const hasChanges = !isEmpty(payload)
if (hasChanges) {
if (selectedTable!.primary_keys.length > 0) {
+ console.log('and it is also right in the payload here', { payload })
+ // seems like here is where the data is being updated
const updateQuery = new Query()
.from(selectedTable!.name, selectedTable!.schema)
.update(payload, { returning: true })