Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

null appearing in text fields #59

Open
Ataye opened this issue May 8, 2015 · 0 comments
Open

null appearing in text fields #59

Ataye opened this issue May 8, 2015 · 0 comments

Comments

@Ataye
Copy link

Ataye commented May 8, 2015

I have some props in my object that are string (in the json text string) but type being reported as object. and contain null values. When bound to a textbox the word 'null' appears. Shouldn't it handle this and instead use an empty string when binding with textboxes?

I got around this by cleaning up the object prior to loading it into way.js using (jquery):

for (var property in obj) {
if (obj.hasOwnProperty(property) && $.isEmptyObject(obj[property]))
   obj[property] = '';
}
way.set("scope", obj);

I'm coming from angular data-binding and wanted a lightweight data-binding solution for my non-angular projects and this is exactly what i needed. Great work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant