Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit112a7f1

Browse files
committed
[Fix]:#1626 fill available space issue
1 parent55157a8 commit112a7f1

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

‎client/packages/lowcoder/src/comps/comps/columnLayout/columnLayout.tsx‎

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -81,15 +81,27 @@ const ContainWrapper = styled.div<{
8181
${props=>props.$style&&getBackgroundStyle(props.$style)}
8282
`;
8383

84+
constgetColumnWidth=(column:any):string=>{
85+
// Use explicit width if available
86+
if(column.width){
87+
returncolumn.width;
88+
}
89+
90+
// No explicit width - return auto to let flex handle it
91+
return'auto';
92+
};
93+
8494
constColWrapper=styled.div<{
8595
$style:ResponsiveLayoutColStyleType|undefined,
8696
$width:string,
8797
$matchColumnsHeight:boolean,
8898
$useFlexLayout:boolean,
99+
$hasExplicitWidth:boolean,
89100
}>`
90101
${props=>props.$useFlexLayout ?`
91-
flex:${props.$width==='100%' ?'1 0 100%' :`0 0${props.$width}`};
92-
max-width:${props.$width};
102+
${props.$hasExplicitWidth
103+
?`flex: 0 0${props.$width}; max-width:${props.$width};`
104+
:'flex: 1 1 0%; min-width: 0;'}
93105
` :''}
94106
95107
> div {
@@ -143,20 +155,6 @@ const ColumnContainer = (props: ColumnContainerProps) => {
143155
);
144156
};
145157

146-
constgetColumnWidth=(column:any):string=>{
147-
// Use explicit width if available
148-
if(column.width){
149-
// For percentage values, calculate precisely to accommodate gaps
150-
if(column.width.endsWith('%')){
151-
returncolumn.width;
152-
}
153-
returncolumn.width;
154-
}
155-
156-
// If minWidth is set, use it or default to equal distribution
157-
returncolumn.minWidth||'auto';
158-
};
159-
160158
constColumnLayout=(props:ColumnLayoutProps)=>{
161159
let{
162160
columns,
@@ -195,6 +193,7 @@ const ColumnLayout = (props: ColumnLayoutProps) => {
195193
if(!containers[id])returnnull
196194
constcontainerProps=containers[id].children;
197195
constcolumnWidth=getColumnWidth(column);
196+
consthasExplicitWidth=!!column.width;
198197

199198
return(
200199
<BackgroundColorContext.Providerkey={id}value={props.columnStyle.background}>
@@ -203,6 +202,7 @@ const ColumnLayout = (props: ColumnLayoutProps) => {
203202
$width={columnWidth}
204203
$matchColumnsHeight={matchColumnsHeight}
205204
$useFlexLayout={useFlexLayout}
205+
$hasExplicitWidth={hasExplicitWidth}
206206
>
207207
<ColumnContainer
208208
layout={containerProps.layout.getView()}

‎client/packages/lowcoder/src/comps/controls/optionsControl.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -647,8 +647,8 @@ ColumnOption = class extends ColumnOption implements OptionCompProperty {
647647

648648
exportconstColumnOptionControl=manualOptionsControl(ColumnOption,{
649649
initOptions:[
650-
{id:0,key:"Column1",label:"Column1",width:"50%"},
651-
{id:1,key:"Column2",label:"Column2",width:"50%"},
650+
{id:0,key:"Column1",label:"Column1",width:""},
651+
{id:1,key:"Column2",label:"Column2",width:""},
652652
],
653653
uniqField:"key",
654654
autoIncField:"id",

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp