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

Commit36c9085

Browse files
allow deleting all query variables
1 parent13dd1f6 commit36c9085

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

‎client/packages/lowcoder-design/src/components/keyValueList.tsx‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ export const KeyValueList = (props: {
9696
onDelete:(item:ReactNode,index:number)=>void;
9797
isStatic?:boolean;
9898
indicatorForAll?:boolean;
99+
allowDeletingAll?:boolean;
99100
})=>{
100101
return(
101102
<>
@@ -105,8 +106,8 @@ export const KeyValueList = (props: {
105106
{item}
106107
{!props.isStatic&&
107108
<DelIcon
108-
onClick={()=>props.list.length>1&&props.onDelete(item,index)}
109-
$forbidden={props.list.length===1}
109+
onClick={()=>(props.allowDeletingAll||(!props.allowDeletingAll&&props.list.length>1))&&props.onDelete(item,index)}
110+
$forbidden={!props.allowDeletingAll&&props.list.length===1}
110111
/>
111112
}
112113
</KeyValueListItem>

‎client/packages/lowcoder/src/comps/queries/queryComp/variablesComp.tsx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ export const VariablesComp = class extends list(VariableItem) {
9898
{(editorState:EditorState)=>(
9999
<ControlPropertyViewWrapper{...params}>
100100
<KeyValueList
101+
allowDeletingAll
101102
list={this.getView().map((child)=>child.propertyView(params))}
102103
onAdd={()=>this.add(editorState)}
103104
onDelete={(item,index)=>this.dispatch(this.deleteAction(index))}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp