Browse Source

fix: mysql use text for multiselect if more than 64 options

Signed-off-by: mertmit <mertmit99@gmail.com>
pull/3937/head
mertmit 2 years ago
parent
commit
783c4d5326
  1. 5
      packages/nocodb-sdk/src/lib/sqlUi/MysqlUi.ts

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

@ -944,7 +944,7 @@ export class MysqlUi {
}
}
static getDataTypeForUiType(col: { uidt: UITypes }, idType?: IDType) {
static getDataTypeForUiType(col: { uidt: UITypes, dtxp?: string, colOptions?: any }, idType?: IDType) {
const colProp: any = {};
switch (col.uidt) {
case 'ID':
@ -977,6 +977,9 @@ export class MysqlUi {
break;
case 'MultiSelect':
colProp.dt = 'set';
if (col.colOptions?.options.length > 64 || col.dtxp?.split(',').length > 64) {
colProp.dt = 'text';
}
break;
case 'SingleSelect':
colProp.dt = 'enum';

Loading…
Cancel
Save