fix(UI): wrong length for char fields on table header

This commit is contained in:
Fabio Di Stasio 2021-02-12 18:02:18 +01:00
parent 0386bbac50
commit 0f69d1dbb7
1 changed files with 2 additions and 1 deletions

View File

@ -81,7 +81,7 @@
<script>
import { uidGen } from 'common/libs/uidGen';
import arrayToFile from '../libs/arrayToFile';
import { LONG_TEXT, BLOB } from 'common/fieldTypes';
import { TEXT, LONG_TEXT, BLOB } from 'common/fieldTypes';
import BaseVirtualScroll from '@/components/BaseVirtualScroll';
import WorkspaceQueryTableRow from '@/components/WorkspaceQueryTableRow';
import TableContext from '@/components/WorkspaceQueryTableContext';
@ -196,6 +196,7 @@ export default {
},
fieldLength (field) {
if ([...BLOB, ...LONG_TEXT].includes(field.type)) return null;
else if (TEXT.includes(field.type)) return field.charLength;
return field.length;
},
keyName (key) {