Skip to content

Commit 8354a3a

Browse files
committed
Fixed an issue that update-on-action would not work when creating folder
1 parent a7ff39c commit 8354a3a

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

client/packages/lowcoder/src/pages/ApplicationV2/HomeLayout.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,8 @@ export interface HomeLayoutProps {
317317
setSearchValue?: any;
318318
setTypeFilterPagination?: any;
319319
setCategoryFilterPagination?: any;
320+
setIsCreated?: any;
321+
isCreated?: boolean;
320322
setModify?: any;
321323
modify?: boolean;
322324
}
@@ -337,7 +339,9 @@ export function HomeLayout(props: HomeLayoutProps) {
337339
setTypeFilterPagination,
338340
setCategoryFilterPagination,
339341
setModify,
340-
modify
342+
modify,
343+
setIsCreated,
344+
isCreated
341345

342346
} = props;
343347

@@ -579,7 +583,7 @@ export function HomeLayout(props: HomeLayoutProps) {
579583
style={{ width: "192px", height: "32px", margin: "0" }}
580584
/>
581585
{mode !== "trash" && mode !== "marketplace" && user.orgDev && (
582-
<CreateDropdown defaultVisible={showNewUserGuide(user)} mode={mode} setModify={setModify} modify={modify!} />
586+
<CreateDropdown defaultVisible={showNewUserGuide(user)} mode={mode} setModify={setIsCreated} modify={isCreated!} />
583587
)}
584588
</OperationRightWrapper>
585589
</OperationWrapper>
@@ -666,7 +670,7 @@ export function HomeLayout(props: HomeLayoutProps) {
666670
? trans("home.projectEmptyCanAdd")
667671
: trans("home.projectEmpty")}
668672
</div>
669-
{mode !== "trash" && mode !== "marketplace" && user.orgDev && <CreateDropdown mode={mode} setModify={setModify} modify={modify!}/>}
673+
{mode !== "trash" && mode !== "marketplace" && user.orgDev && <CreateDropdown mode={mode} setModify={setIsCreated} modify={isCreated!}/>}
670674
</EmptyView>
671675
)}
672676
</>

client/packages/lowcoder/src/pages/ApplicationV2/HomeView.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ export function HomeView() {
2121
const [searchValues, setSearchValues] = useState("");
2222
const [typeFilter, setTypeFilter] = useState<number>(0);
2323
const [modify, setModify] = useState(true);
24+
const [isCreated, setIsCreated] = useState(true);
2425
const [categoryFilter, setCategoryFilter] = useState<ApplicationCategoriesEnum | "All">("All");
2526

2627
useEffect( () => {
@@ -43,7 +44,7 @@ export function HomeView() {
4344
} catch (error) {
4445
console.error('Failed to fetch data:', error);
4546
}
46-
}, [currentPage, pageSize, searchValues, typeFilter, modify, categoryFilter]
47+
}, [currentPage, pageSize, searchValues, typeFilter, modify, categoryFilter, isCreated]
4748
);
4849

4950
useEffect( () => {
@@ -83,6 +84,8 @@ export function HomeView() {
8384
setModify={setModify}
8485
modify={modify}
8586
setCategoryFilterPagination={setCategoryFilter}
87+
setIsCreated={setIsCreated}
88+
isCreated={isCreated}
8689
/>
8790
</>
8891
);

0 commit comments

Comments
 (0)