File tree Expand file tree Collapse file tree
client/packages/openblocks/src/comps Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -379,21 +379,22 @@ function ResizeableTable<RecordType extends object>(props: CustomTableProps<Reco
379379 index : - 1 ,
380380 width : - 1 ,
381381 } ) ;
382+ let allColumnFixed = true ;
382383 const columns = props . columns . map ( ( col , index ) => {
383384 const { width, ...restCol } = col ;
384385 const resizeWidth = ( resizeData . index === index ? resizeData . width : col . width ) ?? 0 ;
385386 let colWidth : number | string = "auto" ;
386387 let minWidth : number | string = COL_MIN_WIDTH ;
387388 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 ;
397398 }
398399 return {
399400 ...restCol ,
Original file line number Diff line number Diff line change @@ -19,7 +19,6 @@ import { TableNameComp } from "./tableNameComp";
1919import { ChangeSetComp } from "./changeSetComp" ;
2020import { FilterComp } from "./FilterComp" ;
2121import { trans } from "i18n" ;
22- import { ResourceType } from "@openblocks-ee/constants/queryConstants" ;
2322import { ColumnNameDropdown } from "./columnNameDropdown" ;
2423import React , { useContext } from "react" ;
2524import { QueryContext } from "util/context/QueryContext" ;
@@ -247,13 +246,13 @@ export const SQLQuery = class extends SQLTmpQuery {
247246 }
248247} ;
249248
250- export const NOT_SUPPORT_GUI_SQL_QUERY : ResourceType [ ] = [
249+ export const NOT_SUPPORT_GUI_SQL_QUERY : string [ ] = [
251250 "clickHouse" ,
252251 "snowflake" ,
253252 "tdengine" ,
254253 "dameng" ,
255254] ;
256- const SUPPORT_UPSERT_SQL_QUERY : ResourceType [ ] = [
255+ const SUPPORT_UPSERT_SQL_QUERY : string [ ] = [
257256 "mysql" ,
258257 "oceanBase" ,
259258 "tidb" ,
You can’t perform that action at this time.
0 commit comments