type_: ListingType;
showLocal: boolean;
showSubscribed: boolean;
- onChange?(val: ListingType): any;
+ onChange(val: ListingType): void;
}
interface ListingTypeSelectState {
super(props, context);
}
- static getDerivedStateFromProps(props: any): ListingTypeSelectProps {
+ static getDerivedStateFromProps(
+ props: ListingTypeSelectProps
+ ): ListingTypeSelectState {
return {
type_: props.type_,
- showLocal: props.showLocal,
- showSubscribed: props.showSubscribed,
};
}
}
handleTypeChange(i: ListingTypeSelect, event: any) {
- i.props.onChange?.(event.target.value);
+ i.props.onChange(event.target.value);
}
}