Skip to content

Commit

Permalink
chore: fix build error with extended type
Browse files Browse the repository at this point in the history
  • Loading branch information
dleard committed Sep 18, 2024
1 parent 29b6fd9 commit a85fbb0
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,19 @@ import { actionHandler } from "@bciers/actions";
import { IChangeEvent } from "@rjsf/core";
const registry = getDefaultRegistry();

interface FuelDataChangeEvent extends IChangeEvent {
fuelName: string;
}

const ObjectField = registry.fields.ObjectField;

export const FuelFields: React.FunctionComponent<FieldProps> = (props) => {
const handleChange = async (c: IChangeEvent) => {
const handleChange = async (c: FuelDataChangeEvent) => {
const fuelData = await actionHandler(
`reporting/fuel?fuel_name=${c.fuelName}`,
"GET",
"",
);
console.log(c);
console.log(fuelData);
props.onChange({
...props.formData,
fuelName: fuelData.name,
Expand Down

0 comments on commit a85fbb0

Please sign in to comment.