Sha256: 3b193bf45f301e47eb8ceb2d13f50065479257c807c0a37128e571fff6a65267
Contents?: true
Size: 809 Bytes
Versions: 16
Compression:
Stored size: 809 Bytes
Contents
import React from 'react'; import PropTypes from 'prop-types'; import Select from 'foremanReact/components/common/forms/Select'; const ExtSelect= ({ hidden, editable, viewText, selectValue, onChange, options, additionalData, }) =>{ if (hidden) { return null; } if (!editable) { return ( <div>{viewText}</div> ); } return ( <Select value={selectValue} onChange={e => onChange(e.target.value, additionalData) } options={options} /> ); }; ExtSelect.propTypes = { hidden: PropTypes.bool.isRequired, editable: PropTypes.bool.isRequired, viewText: PropTypes.string, selectValue: PropTypes.string, onChange: PropTypes.func.isRequired, options: PropTypes.object, additionalData: PropTypes.object, }; export default ExtSelect;
Version data entries
16 entries across 16 versions & 1 rubygems