Skip to content

Commit

Permalink
fix: clean up old code
Browse files Browse the repository at this point in the history
fix: clean up old code
  • Loading branch information
jswhisperer committed Dec 17, 2024
1 parent 75120a7 commit 48ce267
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ export const DefaultField = ({
{field.type === "number" && <Hash size={16} />}
</>
}
htmlFor={id}
readOnly={readOnly}
>
<input
Expand Down
18 changes: 1 addition & 17 deletions packages/core/components/AutoField/fields/RadioField/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,34 +30,18 @@ export const RadioField = ({
<div className={getClassName("radioGroupItems")} id={id}>
{field.options.map((option, index) => (
<label
htmlFor={`${label}-${name}-${index}-${id}`}
key={option.label + option.value}
className={getClassName("radio")}
>
<input
id={`${label}-${name}-${index}-${id}`}
id={id}
type="radio"
className={getClassName("radioInput")}
value={option.value as string | number}
<<<<<<< Updated upstream
name={name}
onChange={({ target: { value } }) =>
onChange(safeJsonParse(value) || value)
}
=======
name={`${label}-${name}-${index}-${id}`}
onChange={(e) => {
if (
e.currentTarget.value === "true" ||
e.currentTarget.value === "false"
) {
onChange(JSON.parse(e.currentTarget.value));
return;
}

onChange(e.currentTarget.value);
}}
>>>>>>> Stashed changes
disabled={readOnly}
checked={value === option.value}
/>
Expand Down

0 comments on commit 48ce267

Please sign in to comment.