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

Commitb8a3848

Browse files
committed
fix:- Error list on JSON Schema Form
1 parentdde6838 commitb8a3848

File tree

1 file changed

+1
-21
lines changed

1 file changed

+1
-21
lines changed

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

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -163,30 +163,11 @@ function transformErrors(errors: RJSFValidationError[]): RJSFValidationError[] {
163163
if(message){
164164
// Error message displayed below the comp (will not be displayed when "ui:help" is set in the UI schema)
165165
error.message=message;
166-
// Errors displayed in the error list, not displayed when empty
167-
error.stack="";
168166
}
169167
returnerror;
170168
});
171169
}
172170

173-
functionErrorList(props:ErrorListProps){
174-
consterrors=props.errors.filter((error)=>error.stack);
175-
// Avoid showing blank space when there are no errors
176-
if(errors.length===0){
177-
return<></>;
178-
}
179-
return(
180-
<divstyle={{color:"red"}}>
181-
<ul>
182-
{errors.map((error)=>(
183-
<likey={error.stack}>{error.stack}</li>
184-
))}
185-
</ul>
186-
</div>
187-
);
188-
}
189-
190171
constSearchableSelectWidget=(props :any)=>{
191172
const{ options, value, required, disabled, readonly, autofocus, onChange}=props;
192173
const{ enumOptions}=options;
@@ -300,10 +281,9 @@ let FormBasicComp = (function () {
300281
templates={{
301282
ObjectFieldTemplate:ObjectFieldTemplate,
302283
ArrayFieldTemplate:ArrayFieldTemplate,
303-
// FieldTemplate: LayoutFieldTemplate,
304284
}}
285+
liveValidate={true}
305286
widgets={{searchableSelect:SearchableSelectWidget}}
306-
// ErrorList={ErrorList}
307287
children={
308288
<Button
309289
hidden={buttonOptions?.norender}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp