File tree Expand file tree Collapse file tree 2 files changed +12
-12
lines changed
client/packages/openblocks/src/comps Expand file tree Collapse file tree 2 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -379,21 +379,22 @@ function ResizeableTable<RecordType extends object>(props: CustomTableProps<Reco
379
379
index : - 1 ,
380
380
width : - 1 ,
381
381
} ) ;
382
+ let allColumnFixed = true ;
382
383
const columns = props . columns . map ( ( col , index ) => {
383
384
const { width, ...restCol } = col ;
384
385
const resizeWidth = ( resizeData . index === index ? resizeData . width : col . width ) ?? 0 ;
385
386
let colWidth : number | string = "auto" ;
386
387
let minWidth : number | string = COL_MIN_WIDTH ;
387
388
if ( resizeWidth > 0 ) {
388
- // fixed width
389
- if ( index === props . columns . length - 1 ) {
390
- // the last column auto width
391
- colWidth = "100%" ;
392
- minWidth = resizeWidth ;
393
- } else {
394
- minWidth = "unset" ;
395
- colWidth = resizeWidth ;
396
- }
389
+ minWidth = "unset" ;
390
+ colWidth = resizeWidth ;
391
+ } else {
392
+ allColumnFixed = false ;
393
+ }
394
+ if ( allColumnFixed && index === props . columns . length - 1 ) {
395
+ // all column fixed, the last column fill extra space
396
+ colWidth = "auto" ;
397
+ minWidth = resizeWidth ;
397
398
}
398
399
return {
399
400
...restCol ,
Original file line number Diff line number Diff line change @@ -19,7 +19,6 @@ import { TableNameComp } from "./tableNameComp";
19
19
import { ChangeSetComp } from "./changeSetComp" ;
20
20
import { FilterComp } from "./FilterComp" ;
21
21
import { trans } from "i18n" ;
22
- import { ResourceType } from "@openblocks-ee/constants/queryConstants" ;
23
22
import { ColumnNameDropdown } from "./columnNameDropdown" ;
24
23
import React , { useContext } from "react" ;
25
24
import { QueryContext } from "util/context/QueryContext" ;
@@ -247,13 +246,13 @@ export const SQLQuery = class extends SQLTmpQuery {
247
246
}
248
247
} ;
249
248
250
- export const NOT_SUPPORT_GUI_SQL_QUERY : ResourceType [ ] = [
249
+ export const NOT_SUPPORT_GUI_SQL_QUERY : string [ ] = [
251
250
"clickHouse" ,
252
251
"snowflake" ,
253
252
"tdengine" ,
254
253
"dameng" ,
255
254
] ;
256
- const SUPPORT_UPSERT_SQL_QUERY : ResourceType [ ] = [
255
+ const SUPPORT_UPSERT_SQL_QUERY : string [ ] = [
257
256
"mysql" ,
258
257
"oceanBase" ,
259
258
"tidb" ,
You can’t perform that action at this time.
0 commit comments