diff options
author | 2018-12-07 20:25:42 +0100 | |
---|---|---|
committer | 2018-12-07 20:25:42 +0100 | |
commit | baf7d60af40e9cc3ce5403c5e109331098d5e1d6 (patch) | |
tree | 1973e6304b04088dc6ff9324b7e73fb52c400c9e /src/components/ui/Select.js | |
parent | Update package-lock.json (diff) | |
download | ferdium-app-baf7d60af40e9cc3ce5403c5e109331098d5e1d6.tar.gz ferdium-app-baf7d60af40e9cc3ce5403c5e109331098d5e1d6.tar.zst ferdium-app-baf7d60af40e9cc3ce5403c5e109331098d5e1d6.zip |
feat(Service): Add option to change spellchecking language by service
Diffstat (limited to 'src/components/ui/Select.js')
-rw-r--r-- | src/components/ui/Select.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/components/ui/Select.js b/src/components/ui/Select.js index abcad417e..102737bec 100644 --- a/src/components/ui/Select.js +++ b/src/components/ui/Select.js | |||
@@ -9,12 +9,14 @@ export default @observer class Select extends Component { | |||
9 | field: PropTypes.instanceOf(Field).isRequired, | 9 | field: PropTypes.instanceOf(Field).isRequired, |
10 | className: PropTypes.string, | 10 | className: PropTypes.string, |
11 | showLabel: PropTypes.bool, | 11 | showLabel: PropTypes.bool, |
12 | disabled: PropTypes.bool, | ||
12 | }; | 13 | }; |
13 | 14 | ||
14 | static defaultProps = { | 15 | static defaultProps = { |
15 | className: null, | 16 | className: null, |
16 | focus: false, | 17 | focus: false, |
17 | showLabel: true, | 18 | showLabel: true, |
19 | disabled: false, | ||
18 | }; | 20 | }; |
19 | 21 | ||
20 | render() { | 22 | render() { |
@@ -22,13 +24,17 @@ export default @observer class Select extends Component { | |||
22 | field, | 24 | field, |
23 | className, | 25 | className, |
24 | showLabel, | 26 | showLabel, |
27 | disabled, | ||
25 | } = this.props; | 28 | } = this.props; |
26 | 29 | ||
30 | console.log('disabled', disabled); | ||
31 | |||
27 | return ( | 32 | return ( |
28 | <div | 33 | <div |
29 | className={classnames({ | 34 | className={classnames({ |
30 | 'franz-form__field': true, | 35 | 'franz-form__field': true, |
31 | 'has-error': field.error, | 36 | 'has-error': field.error, |
37 | 'is-disabled': disabled, | ||
32 | [`${className}`]: className, | 38 | [`${className}`]: className, |
33 | })} | 39 | })} |
34 | > | 40 | > |
@@ -45,12 +51,13 @@ export default @observer class Select extends Component { | |||
45 | id={field.id} | 51 | id={field.id} |
46 | defaultValue={field.value} | 52 | defaultValue={field.value} |
47 | className="franz-form__select" | 53 | className="franz-form__select" |
54 | disabled={field.disabled || disabled} | ||
48 | > | 55 | > |
49 | {field.options.map(type => ( | 56 | {field.options.map(type => ( |
50 | <option | 57 | <option |
51 | key={type.value} | 58 | key={type.value} |
52 | value={type.value} | 59 | value={type.value} |
53 | // selected={field.value === } | 60 | disabled={type.disabled} |
54 | > | 61 | > |
55 | {type.label} | 62 | {type.label} |
56 | </option> | 63 | </option> |