diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-05-21 17:58:04 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-05-21 17:58:04 +0200 |
| commit | 4bc41e2c2a8b3fc8b22226a7f3ec6cc1e1a275b6 (patch) | |
| tree | 5852f240d7d84afd5e8676029df238ba08b93c89 /app/client/common/select.component.js | |
| parent | 34573a4f34c862ee884d0a3fd5badb1d4af1d9c2 (diff) | |
more dropdowns
Diffstat (limited to 'app/client/common/select.component.js')
| -rw-r--r-- | app/client/common/select.component.js | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/app/client/common/select.component.js b/app/client/common/select.component.js index 9ff60ce..3b008a3 100644 --- a/app/client/common/select.component.js +++ b/app/client/common/select.component.js @@ -15,10 +15,19 @@ class Select extends Component { } render() { const value = this.props.opt[this.props.name] - const options = this.props.options.map((key,i) => { + const options = (this.props.options || []).map((key,i) => { + let name, value + if (typeof key == 'string') { + name = key.length < 4 ? key.toUpperCase() : key + value = key + } else { + let frames = Math.round(key.count / 30) + ' s.' + name = key.name.replace(/_/g, ' ') + ' (' + frames + ')' + value = key.name + } return ( - <option value={key} key={i}> - {capitalize(key)} + <option value={value} key={i}> + {name} </option> ) }) |
