import { randomStr } from "@utils/helpers"; import classNames from "classnames"; import { Component, linkEvent } from "inferno"; import { DataType } from "../../interfaces"; import { I18NextService } from "../../services"; interface DataTypeSelectProps { type_: DataType; onChange?(val: DataType): any; } interface DataTypeSelectState { type_: DataType; } export class DataTypeSelect extends Component< DataTypeSelectProps, DataTypeSelectState > { private id = `listing-type-input-${randomStr()}`; state: DataTypeSelectState = { type_: this.props.type_, }; constructor(props: any, context: any) { super(props, context); } static getDerivedStateFromProps(props: any): DataTypeSelectProps { return { type_: props.type_, }; } render() { return (