Skip to content

Commit 5464c85

Browse files
committed
#1720 add adjustable height in fixed mode
1 parent 5407edc commit 5464c85

File tree

1 file changed

+14
-2
lines changed
  • client/packages/lowcoder/src/comps/comps/fileComp

1 file changed

+14
-2
lines changed

client/packages/lowcoder/src/comps/comps/fileComp/fileComp.tsx

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -713,7 +713,19 @@ let FileTmpComp = new UICompBuilder(childrenMap, (props, dispatch) => {
713713
))
714714
.build();
715715

716-
FileTmpComp = withMethodExposing(FileTmpComp, [
716+
class FileImplComp extends FileTmpComp {
717+
override autoHeight(): boolean {
718+
// Button mode is always fixed (grid should show resize handles)
719+
const mode = this.children.uploadMode.getView(); // "button" | "dragArea"
720+
if (mode !== "dragArea") return false;
721+
722+
// "auto" | "fixed" -> boolean
723+
const h = this.children.autoHeight.getView();
724+
return h;
725+
}
726+
}
727+
728+
const FileWithMethods = withMethodExposing(FileImplComp, [
717729
{
718730
method: {
719731
name: "clearValue",
@@ -731,7 +743,7 @@ FileTmpComp = withMethodExposing(FileTmpComp, [
731743
},
732744
]);
733745

734-
export const FileComp = withExposingConfigs(FileTmpComp, [
746+
export const FileComp = withExposingConfigs(FileWithMethods, [
735747
new NameConfig("value", trans("file.filesValueDesc")),
736748
new NameConfig(
737749
"files",

0 commit comments

Comments
 (0)