Select.tsx 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. // import React, { PureComponent } from 'react';
  2. // import Select as ReactSelect from 'react-select';
  3. // import DescriptionOption from './DescriptionOption';
  4. // import IndicatorsContainer from './IndicatorsContainer';
  5. // import ResetStyles from './ResetStyles';
  6. //
  7. // export interface OptionType {
  8. // label: string;
  9. // value: string;
  10. // }
  11. //
  12. // interface Props {
  13. // defaultValue?: any;
  14. // getOptionLabel: (item: T) => string;
  15. // getOptionValue: (item: T) => string;
  16. // onChange: (item: T) => {} | void;
  17. // options: T[];
  18. // placeholder?: string;
  19. // width?: number;
  20. // value: T;
  21. // className?: string;
  22. // }
  23. //
  24. // export class Select<T> extends PureComponent<Props<T>> {
  25. // static defaultProps = {
  26. // width: null,
  27. // className: '',
  28. // }
  29. //
  30. // render() {
  31. // const { defaultValue, getOptionLabel, getOptionValue, onSelected, options, placeholder, width, value, className } = this.props;
  32. // let widthClass = '';
  33. // if (width) {
  34. // widthClass = 'width-'+width;
  35. // }
  36. //
  37. // return (
  38. // <ReactSelect
  39. // classNamePrefix="gf-form-select-box"
  40. // className={`gf-form-input gf-form-input--form-dropdown ${widthClass} ${className}`}
  41. // components={{
  42. // Option: DescriptionOption,
  43. // IndicatorsContainer,
  44. // }}
  45. // defaultValue={defaultValue}
  46. // value={value}
  47. // getOptionLabel={getOptionLabel}
  48. // getOptionValue={getOptionValue}
  49. // menuShouldScrollIntoView={false}
  50. // isSearchable={false}
  51. // onChange={onSelected}
  52. // options={options}
  53. // placeholder={placeholder || 'Choose'}
  54. // styles={ResetStyles}
  55. // />
  56. // );
  57. // }
  58. // }
  59. //
  60. // export default Select;