Closed Dissolubilis closed 8 years ago
Thanks for calling this out. You are right, this is a regression. I have a fix ready, which I will include in the next update. With the fix you will be able to use either undefined
or null
and the attribute will be removed. Let me know if it is urgent for you, and I could send you a private fix...
Thanks. If the next update is not coming soon, then it will be great to get your fix
In fact the fix is to replace: https://github.com/BorisMoore/jsviews/blob/master/jsviews.js#L2023
: (getsVal = true, "((v=" + params[0] + ')!=null?v:"")')
by
: (getsVal = true, "((v=" + params[0] + ')!=null?v:' + (isLinkExpr ? 'null)' : '"")'))
Thank you. It is working after applying the fix.
This is fixed in commit 78.
You have mentioned in #117 that the the linked attributes will be removed if its value is null or empty. However I cannot approach it. For example linking to
<a data-link="href{:null}"> I am not the link</a>
will provide
<a data-link="href{:null}" href="">I am not the link</a>
And desired effect is:
<a data-link="href{:null}" >I am not the link</a>
Simple jsfiddle is here - https://jsfiddle.net/vLmsnmrx/6/
I tried null, undefined and empty string. What am I doing wrong?