Quantcast
Channel: JavaScriptMVC Forum
Viewing all articles
Browse latest Browse all 3491

Mustache live binding issue no 1 (of 2)

$
0
0
Using canjs 1.1.7 with jQuery and Mustache templates

I have a 2x pane UI with a 'summary' in the left pane that is a nested <ul> with clickable links, very like a simple file tree widget with the file opening in the right pane.

The left 'summary' is driven by a single Observe.List created from a single depth array of pretty simple objects - a slack handful of key-values all text entries, nothing special.

If I edit an entry in the right hand pane and 'save' it the code basically just does a series of object.attr(...) changes on the approriate Observe.List entry

And I get immediate reflection in the summary panel via live binding. So far so good ...

However
=======

If I add a new entry using myObservableList.push(newItem) then live binding does NOT work and I have to manually re-render the left hand summary panel.

To complicate matters a simple test with absolutely no complications shows that the push() live binding does basically work, so I'm doing something wrong or triggering a bug.

Question
=======

Any idea what might be the problem ? It's too complex to create a fiddle ...

I have another issue which may or may not be connected and will post separately.

Regards

Ron Yuen


Viewing all articles
Browse latest Browse all 3491

Trending Articles