Browse Source

feat: set default value of checkbox field as false/0

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/4885/head
Pranav C 2 years ago
parent
commit
d53209c4ae
  1. 1
      packages/nocodb-sdk/src/lib/sqlUi/MssqlUi.ts
  2. 2
      packages/nocodb-sdk/src/lib/sqlUi/MysqlUi.ts
  3. 1
      packages/nocodb-sdk/src/lib/sqlUi/OracleUi.ts
  4. 1
      packages/nocodb-sdk/src/lib/sqlUi/PgUi.ts
  5. 2
      packages/nocodb-sdk/src/lib/sqlUi/SnowflakeUi.ts
  6. 3
      packages/nocodb-sdk/src/lib/sqlUi/SqliteUi.ts

1
packages/nocodb-sdk/src/lib/sqlUi/MssqlUi.ts

@ -1084,6 +1084,7 @@ export class MssqlUi {
case 'Checkbox':
colProp.dt = 'tinyint';
colProp.dtxp = 1;
colProp.cdf = '0';
break;
case 'MultiSelect':
colProp.dt = 'text';

2
packages/nocodb-sdk/src/lib/sqlUi/MysqlUi.ts

@ -597,7 +597,6 @@ export class MysqlUi {
}
static onCheckboxChangeAI(col) {
console.log(col);
if (
col.dt === 'int' ||
col.dt === 'bigint' ||
@ -977,6 +976,7 @@ export class MysqlUi {
case 'Checkbox':
colProp.dt = 'tinyint';
colProp.dtxp = 1;
colProp.cdf = '0';
break;
case 'MultiSelect':
colProp.dt = 'set';

1
packages/nocodb-sdk/src/lib/sqlUi/OracleUi.ts

@ -824,6 +824,7 @@ export class OracleUi {
case 'Checkbox':
colProp.dt = 'tinyint';
colProp.dtxp = 1;
colProp.cdf = '0';
break;
case 'MultiSelect':
colProp.dt = 'varchar2';

1
packages/nocodb-sdk/src/lib/sqlUi/PgUi.ts

@ -1596,6 +1596,7 @@ export class PgUi {
break;
case 'Checkbox':
colProp.dt = 'bool';
colProp.cdf = 'false';
break;
case 'MultiSelect':
colProp.dt = 'text';

2
packages/nocodb-sdk/src/lib/sqlUi/SnowflakeUi.ts

@ -688,6 +688,7 @@ export class SnowflakeUi {
break;
case 'Checkbox':
colProp.dt = 'BOOLEAN';
colProp.cdf = '0';
break;
case 'MultiSelect':
colProp.dt = 'TEXT';
@ -700,7 +701,6 @@ export class SnowflakeUi {
break;
case 'Date':
colProp.dt = 'DATE';
break;
case 'Year':
colProp.dt = 'INT';

3
packages/nocodb-sdk/src/lib/sqlUi/SqliteUi.ts

@ -788,9 +788,8 @@ export class SqliteUi {
colProp.dt = 'text';
break;
case 'Checkbox':
// colProp.dt = 'tinyint';
// colProp.dtxp = 1;
colProp.dt = 'boolean';
colProp.cdf = '0';
break;
case 'MultiSelect':
colProp.dt = 'text';

Loading…
Cancel
Save