diff --git a/frontend/libs/console/legacy-ce/src/lib/dataSources/index.ts b/frontend/libs/console/legacy-ce/src/lib/dataSources/index.ts index 6e23e983807..91d077b5519 100644 --- a/frontend/libs/console/legacy-ce/src/lib/dataSources/index.ts +++ b/frontend/libs/console/legacy-ce/src/lib/dataSources/index.ts @@ -116,6 +116,7 @@ export interface DataSourcesAPI { NUMERIC?: string; DATE?: string; BOOLEAN?: string; + BOOL?: string; TEXT?: string; ARRAY?: string; BIGSERIAL?: string; @@ -445,6 +446,7 @@ export interface DataSourcesAPI { } export let currentDriver: Driver = 'postgres'; + export let dataSource: DataSourcesAPI = services[currentDriver || 'postgres']; export const isFeatureSupported = ( diff --git a/frontend/libs/console/legacy-ce/src/lib/dataSources/services/postgresql/index.tsx b/frontend/libs/console/legacy-ce/src/lib/dataSources/services/postgresql/index.tsx index c1121ff2ba8..0372e03a905 100644 --- a/frontend/libs/console/legacy-ce/src/lib/dataSources/services/postgresql/index.tsx +++ b/frontend/libs/console/legacy-ce/src/lib/dataSources/services/postgresql/index.tsx @@ -384,6 +384,7 @@ const columnDataTypes = { BIGINT: 'bigint', BIGSERIAL: 'bigserial', BOOLEAN: 'boolean', + BOOL: 'bool', DATE: 'date', DATETIME: 'datetime', INTEGER: 'integer', diff --git a/frontend/libs/console/legacy-ce/src/lib/features/InsertRow/InsertRowForm.tsx b/frontend/libs/console/legacy-ce/src/lib/features/InsertRow/InsertRowForm.tsx index cb9ab956792..a3296478970 100644 --- a/frontend/libs/console/legacy-ce/src/lib/features/InsertRow/InsertRowForm.tsx +++ b/frontend/libs/console/legacy-ce/src/lib/features/InsertRow/InsertRowForm.tsx @@ -133,7 +133,7 @@ export const InsertRowForm: React.VFC = ({ onChange={onChange} placeholder={column.placeholder} isDisabled={!column.insertable} - // disable if the column has no default value + // TODO-NEXT: disable if the column has no default value isDefaultDisabled={false} isNullDisabled={!column.nullable} resetToken={resetToken} diff --git a/frontend/libs/console/legacy-ce/src/lib/features/InsertRow/components/ColumnRow.tsx b/frontend/libs/console/legacy-ce/src/lib/features/InsertRow/components/ColumnRow.tsx index 42fce00b87e..71560563f43 100644 --- a/frontend/libs/console/legacy-ce/src/lib/features/InsertRow/components/ColumnRow.tsx +++ b/frontend/libs/console/legacy-ce/src/lib/features/InsertRow/components/ColumnRow.tsx @@ -134,7 +134,6 @@ export const ColumnRow = ({ onInput={checkValueRadio} inputRef={valueInputRef} disabled={isDisabled} - tabIndex={2} placeholder={placeholder} onValueChange={onValueChange} onCheckValueRadio={onCheckValueRadio} diff --git a/frontend/libs/console/legacy-ce/src/lib/features/InsertRow/components/ColumnRowInput.tsx b/frontend/libs/console/legacy-ce/src/lib/features/InsertRow/components/ColumnRowInput.tsx index c3232ec106d..1b19c36201c 100644 --- a/frontend/libs/console/legacy-ce/src/lib/features/InsertRow/components/ColumnRowInput.tsx +++ b/frontend/libs/console/legacy-ce/src/lib/features/InsertRow/components/ColumnRowInput.tsx @@ -45,7 +45,10 @@ export const ColumnRowInput: React.VFC = ({ return ; } - if (dataType === dataSource.columnDataTypes.BOOLEAN) { + if ( + dataType === dataSource.columnDataTypes.BOOLEAN || + dataType === dataSource.columnDataTypes.BOOL + ) { return ( = ({ type="text" className={clsx(inputTw, className || '')} disabled={disabled} - tabIndex={2} placeholder={placeholder} /> ); diff --git a/frontend/libs/console/legacy-ce/src/lib/features/InsertRow/utils/getPlaceholder.ts b/frontend/libs/console/legacy-ce/src/lib/features/InsertRow/utils/getPlaceholder.ts index 9e4387c4709..2680d8706d5 100644 --- a/frontend/libs/console/legacy-ce/src/lib/features/InsertRow/utils/getPlaceholder.ts +++ b/frontend/libs/console/legacy-ce/src/lib/features/InsertRow/utils/getPlaceholder.ts @@ -12,6 +12,7 @@ export const getPlaceholder = (type: TableColumn['data_type']) => { case dataSource.columnDataTypes.DATE: return getISODatePart(); case dataSource.columnDataTypes.TIME: + case 'time': // eslint-disable-next-line no-case-declarations const time = getISOTimePart(); return `${time}Z or ${time}+05:30`;