Comments (6)
Thanks, Johann. Another good find. That is a bug which arises in the case of having jquery.observable.js and jsrender.js and jquery,views.js as separate files, with jquery.observable.js loaded before jsrender.js. I have repro.
I believe that if you load jsrender.js first or use jsviews.js (single file) the issue will not occur.
I'll work to get a fix, then let you know here...
from jsviews.
Great! Once I have this fixed I can push the new version into production.
from jsviews.
Hi Johan, I think this should fix the issue:
Let me know if it works for you.
(It also includes a fix to jsrender-node.js, and your issue #447 (comment))
from jsviews.
An other related potential? issue is the following. In jquery.views.js on line 3184:
contextOb = contextOb && $sub.tmplFn(delimOpenChar1 + ":" + contextOb[1] + delimCloseChar0, view.tmpl, true)(linkCtx.data, view);
The compiled function returned by tmplFn() have both j and u input parameters but the call only passes in data and the view. There are a number of places where a similar call is made without passing in the extra parameters. I can't actually remember if I had an issue with it or not.
Just letting you know for your consideration.
from jsviews.
You are right!! Thanks...
It is difficult to make a bug scenario that encounters that as an issue, but I managed to do so with this:
{^{on ~util[0].swap ...}}
which I will add to the unit tests.
So I have fixed it in the update below, to pass in $sub
:
contextOb = contextOb && $sub.tmplFn(delimOpenChar1 + ":" + contextOb[1] + delimCloseChar0, view.tmpl, true)(linkCtx.data, view, $sub);
The u
parameter is intended to be undefined
, but in this update I have eliminated the ,u
from the generated functions. I previously intended to use u
for undefined
in generated code, but I don't seem to be leveraging that any more, so I think it is OK to remove it.
Here is the update:
from jsviews.
This has been fixed in new release v1.0.7
from jsviews.
Related Issues (20)
- How to observe property array properly? HOT 2
- better error message HOT 5
- observable ev.data.observeAll helper broken when path is "*" HOT 7
- linked tag property changed handler called when it shouldn't HOT 51
- {{for ..}} emits <tr> and <td> tags HOT 1
- for tag with range and data-linked tr give error when removing object from array HOT 5
- Delimiters not working for "[ " and " ]" HOT 2
- linking of selected value on select element does not work correctly with all jquery versions HOT 5
- jsrender.min.js.map truncated HOT 6
- removeView performance HOT 2
- $.observe/$.unobserve performance degradation over time HOT 5
- If the selected value of a data-linked <select> is set prior to adding options, selection is not always established correctly HOT 3
- multiselect not updating when linked array changes HOT 10
- Binding to computed functions: onBind callback called twice. If computed function has no setter , "... is not a function" exception thrown HOT 6
- html comments not working in tables HOT 4
- performance improvement in JsObservable HOT 2
- Formatting a number in data-link ? HOT 2
- Using a tmpl selector that begins with a # but is not an ID selector does not work HOT 5
- Top-level data-link="{for...}" does not work on a 'select' element HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jsviews.