Skip to content

Commit 5ae3316

Browse files
author
Gavin McDonald
committed
cleanup
1 parent c95b198 commit 5ae3316

File tree

6 files changed

+2
-13
lines changed

6 files changed

+2
-13
lines changed

app/packages/components/src/components/SmartForm/index.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import widgets from "./widgets";
1111
import templates from "./templates";
1212

1313
export { isSchemaIOSchema, isJSONSchema } from "./translators";
14-
export type { SmartFormProps };
1514

1615
import type { IChangeEvent } from "@rjsf/core";
1716
import type { ValidatorType, UiSchema } from "@rjsf/utils";

app/packages/components/src/components/SmartForm/templates/FieldTemplate.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
/**
2-
* Minimal FieldTemplate - widgets are responsible for rendering their own labels
3-
*
4-
* This template only handles errors and help text, leaving label rendering
5-
* to individual widgets for maximum flexibility.
2+
* Minimal FieldTemplate
63
*/
74

85
import React from "react";

app/packages/components/src/components/SmartForm/templates/ObjectFieldTemplate.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
/**
2-
* Custom ObjectFieldTemplate that ensures vertical stacking of form fields
2+
* Custom ObjectFieldTemplate
33
*
44
* This overrides the default @rjsf/mui Grid layout to match SchemaIO's
5-
* vertical field layout style.
65
*/
76

87
import { ObjectFieldTemplateProps } from "@rjsf/utils";

app/packages/components/src/components/SmartForm/widgets/AutoComplete.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ export default function AutoComplete(props: WidgetProps) {
2424
label: enumNames[index] || val,
2525
}));
2626

27-
// Determine if this is multiple selection (array type)
2827
const multiple = schema.type === "array";
2928

3029
// Build SchemaIO-compatible schema
@@ -42,7 +41,6 @@ export default function AutoComplete(props: WidgetProps) {
4241
},
4342
};
4443

45-
// Adapt onChange to work with SchemaIO's path-based onChange
4644
const handleChange = (_path: string, newValue: unknown) => {
4745
onChange(newValue);
4846
};

app/packages/components/src/components/SmartForm/widgets/Dropdown.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ export default function Dropdown(props: WidgetProps) {
2525
label: enumNames[index] || val,
2626
}));
2727

28-
// Determine if this is multiple selection (array type)
2928
const multiple = schema.type === "array";
3029

3130
// Build SchemaIO-compatible schema
@@ -44,7 +43,6 @@ export default function Dropdown(props: WidgetProps) {
4443
},
4544
};
4645

47-
// Adapt onChange to work with SchemaIO's path-based onChange
4846
const handleChange = (path: string, newValue: any) => {
4947
onChange(newValue);
5048
};

app/packages/components/src/components/SmartForm/widgets/TextWidget.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,10 @@ export default function TextWidget(props: WidgetProps) {
3838
const inputType =
3939
schema.type === "number" || schema.type === "integer" ? "number" : "text";
4040

41-
// Build inputProps with step for number inputs
4241
const inputProps: Record<string, any> = {
4342
"data-1p-ignore": true,
4443
};
4544

46-
// Honor multipleOf for number inputs (maps to step attribute)
4745
if (inputType === "number" && schema.multipleOf !== undefined) {
4846
inputProps.step = schema.multipleOf;
4947
}

0 commit comments

Comments
 (0)