Comments (6)
By no means am I an expert - I just started learning Javascript and found Meteor/Webix crazy-easy to learn.
But how I've been pulling in a JSON file is to use the mongoimport program so that it becomes a Meteor collection (so you can use url property to load and save property to save), e.g.
webix.ui({
view: 'datatable',
autoconfig: true,
editable: true,
url: webix.proxy('meteor', Emails.find()),
save: webix.proxy('meteor', Emails)
});
I'm sure there's other ways to do this, but my JSON file is coming via ODBC so I already have to automate via a shell script anyway.
from meteor-webix.
Thanks for responding! Yeah, I'm using the same technique to proxy the MondoDB data, which is really awesomely built; however, I'm having trouble with editing an object field using Webix's API.
So if you had a document like this:
{
"name": "John",
"stuff": ["part 1", "part 2", "part 3"],
"moreStuff": {
"phone": {
"brand": "iphone",
"version": 6,
"valid": false
}
}
}
I can only display the field, "brand," but can't update it natively. With the code below, it creates a new field with the name brand (or whatever string is in the id field) rather than using the specific property created with the map setting.
{
"name": "John",
"stuff": ["part 1", "part 2", "part 3"],
"moreStuff": {
"phone": {
"brand": "iphone",
"version": 6,
"valid": false
}
},
"brand": "editedContent"
}
var dataTable;
dataTable = {
view: 'datatable',
id: 'datatable',
columns: [
{
id: 'someText',
header: 'This is a brand',
editor: 'text',
fillspace: true,
map: "#moreStuff.phone.brand#"
}
],
select: true,
editable: true,
editaction: 'dblclick',
url: webix.proxy('meteor', Meteor.users),
save: webix.proxy('meteor', Meteor.users)
};
// ---
// generated by coffee-script 1.9.2
Are you having the same issues? How would you display and edit the field "brand"?
from meteor-webix.
If you're interested, I created a working example at: https://github.com/KyleKing/meteor-webix/tree/master/examples/crud-objects
Update: I've tried using the scheme setting, but Webix continues to fall back on the id property to update a document (relevant documentation: http://docs.webix.com/datatable__data_mapping.html)
from meteor-webix.
@KyleKing I haven't had time to look at this, but I would suggest the use of Webix Snippet (http://webix.com/snippet/) to work through Webix issues. It doesn't sound like it is much to do with Meteor yet so if you get your working example up on Snippet I think more folks (including me when I get a chance) will be able to interactively play with this.
Generally all of my datatable JSON objects are simple 2-d rows/columns without hierarchy.
from meteor-webix.
Thanks for the suggestion! And whenever you have a chance, I started a snippet here: http://webix.com/snippet/9a29f390. I'm not sure how to save/load the data in a snippet, but I created a variable and display it on the table
from meteor-webix.
I'm switching to meteor-tabular, since it has the functions that I'm looking for.
If anyone else has the same issue, I found an older issue that looks like it should help fix this: #5
from meteor-webix.
Related Issues (20)
- Meteor style example HOT 1
- Demo site not working anymore HOT 1
- Error callback for collection operations
- Scrolling stops on mobiles and tablets straight after installing meteor webix HOT 2
- Update to 2.4.7 HOT 4
- Sort? HOT 1
- Vertical resizer breaks the crud example
- Publish/Subscribe Large collections HOT 1
- Is this amazing project going to restart sometime soon? HOT 17
- Preserve sort order when items are added to the Datatable
- Google Map to a webix template-driven widget
- Package version of webix:webix is wrong? HOT 4
- Bad link in readme.md
- Meteor UserAccounts Webix project started HOT 4
- Meteor Webix UserAccounts (v1.0.0) HOT 6
- Webix Form half-works HOT 1
- Missing Webix.css
- Font Awesome version mismatch
- Any way to update to webix 3.1? HOT 1
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 meteor-webix.