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

Commita4af806

Browse files
committed
make one unified options for saving
1 parent47aeb17 commita4af806

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

‎client/packages/lowcoder/src/comps/comps/tagsComp/tagsCompView.tsx‎

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -419,8 +419,6 @@ const multiTags = (function () {
419419
exportconstMultiTagsComp=withExposingConfigs(
420420
multiTags,
421421
[
422-
newNameConfig("options","Current tags array"),
423-
newNameConfig("runtimeOptions","Runtime tags array"),
424422
depsConfig({
425423
name:"selectedTag",
426424
desc:"Currently selected tag data",
@@ -441,7 +439,7 @@ export const MultiTagsComp = withExposingConfigs(
441439
func:(input)=>input.selectedTagIndex
442440
}),
443441
depsConfig({
444-
name:"selectedTagLabel",
442+
name:"selectedTagLabel",
445443
desc:"Label of currently selected tag",
446444
depKeys:["selectedTagIndex","runtimeOptions"],
447445
func:(input)=>{
@@ -452,6 +450,22 @@ export const MultiTagsComp = withExposingConfigs(
452450
}
453451
return"";
454452
}
453+
}),
454+
depsConfig({
455+
name:"options",
456+
desc:"Current tags array (updates based on editable prop)",
457+
depKeys:["options","runtimeOptions","editable"],
458+
func:(input)=>{
459+
const{ editable, options, runtimeOptions}=input;
460+
461+
// If not editable, always use the original props.options
462+
if(!editable){
463+
returnArray.isArray(options) ?options :[];
464+
}
465+
466+
// If editable, use runtimeOptions (user modifications)
467+
returnArray.isArray(runtimeOptions) ?runtimeOptions :[];
468+
}
455469
})
456470
]
457471
);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp