Skip to content

Commit

Permalink
chosen binding needs to be updated after changing it's visibility sta…
Browse files Browse the repository at this point in the history
…te from hidden to shown (harvesthq/chosen#92), this is a little be of a hack, but works, so.... in she goes, re #997
  • Loading branch information
apeters committed Oct 29, 2016
1 parent 3609edd commit 4b77c61
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions arches/app/media/js/views/functions/primary-name.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ define(['knockout',
'knockout-mapping',
'viewmodels/function',
'models/card',
'chosen'],
function (ko, koMapping, FunctionViewModel, CardModel, data) {
'bindings/chosen'],
function (ko, koMapping, FunctionViewModel, CardModel, chosen) {
return ko.components.register('views/functions/primary-name', {
viewModel: function(params) {
FunctionViewModel.apply(this, params);
Expand Down Expand Up @@ -37,10 +37,7 @@ function (ko, koMapping, FunctionViewModel, CardModel, data) {

}, this);

// koMapping.fromJS({
// string_template: this.string_template,
// nodegroup_id: this.nodegroup_id
// },params);
window.setTimeout(function(){$("select[data-bind^=chosen]").trigger("chosen:updated")}, 300);
},
template: {
require: 'text!function-templates/primary-name'
Expand Down

0 comments on commit 4b77c61

Please sign in to comment.