import { Component, linkEvent } from "inferno"; import { i18n } from "../../i18next"; import { DataType } from "../../interfaces"; interface DataTypeSelectProps { type_: DataType; onChange?(val: DataType): any; } interface DataTypeSelectState { type_: DataType; } export class DataTypeSelect extends Component< DataTypeSelectProps, DataTypeSelectState > { private emptyState: DataTypeSelectState = { type_: this.props.type_, }; constructor(props: any, context: any) { super(props, context); this.state = this.emptyState; } static getDerivedStateFromProps(props: any): DataTypeSelectProps { return { type_: props.type_, }; } render() { return (