aboutsummaryrefslogtreecommitdiffstats
path: root/app/javascript/time_tables/components
diff options
context:
space:
mode:
authorZog2018-04-09 16:45:41 +0200
committercedricnjanga2018-04-16 16:52:20 -0700
commitdddfb8d52fbe36176142ae0c511f664a9e4791b7 (patch)
treea89012f7a61c1810cfd3f677242fc013ce05a519 /app/javascript/time_tables/components
parent99a13edd10da16b1039791bb97258f5af77c764a (diff)
downloadchouette-core-dddfb8d52fbe36176142ae0c511f664a9e4791b7.tar.bz2
Refs #6449; Fix tags in timetables editor
Diffstat (limited to 'app/javascript/time_tables/components')
-rw-r--r--app/javascript/time_tables/components/Metas.js1
-rw-r--r--app/javascript/time_tables/components/TagsSelect2.js4
2 files changed, 2 insertions, 3 deletions
diff --git a/app/javascript/time_tables/components/Metas.js b/app/javascript/time_tables/components/Metas.js
index d9746a379..186af540a 100644
--- a/app/javascript/time_tables/components/Metas.js
+++ b/app/javascript/time_tables/components/Metas.js
@@ -76,7 +76,6 @@ export default function Metas({metas, onUpdateDayTypes, onUpdateComment, onUpdat
<label htmlFor="" className="control-label col-sm-4">{I18n.attribute_name('time_table', 'tag_list')}</label>
<div className="col-sm-8">
<TagsSelect2
- initialTags={metas.initial_tags}
tags={metas.tags}
onSelect2Tags={(e) => onSelect2Tags(e)}
onUnselect2Tags={(e) => onUnselect2Tags(e)}
diff --git a/app/javascript/time_tables/components/TagsSelect2.js b/app/javascript/time_tables/components/TagsSelect2.js
index dd8d6e9c0..fe610ed58 100644
--- a/app/javascript/time_tables/components/TagsSelect2.js
+++ b/app/javascript/time_tables/components/TagsSelect2.js
@@ -27,7 +27,7 @@ export default class TagsSelect2 extends Component {
return (
<Select2
value={(this.props.tags.length) ? map(this.props.tags, 'id') : undefined}
- data={(this.props.initialTags.length) ? this.mapKeys(this.props.initialTags) : undefined}
+ data={(this.props.tags.length) ? this.mapKeys(this.props.tags) : undefined}
onSelect={(e) => this.props.onSelect2Tags(e)}
onUnselect={(e) => setTimeout( () => this.props.onUnselect2Tags(e, 150))}
multiple={true}
@@ -74,4 +74,4 @@ export default class TagsSelect2 extends Component {
const formatRepo = (props) => {
if(props.name) return props.name
-} \ No newline at end of file
+}