Skip to content
This repository has been archived by the owner on Nov 2, 2020. It is now read-only.

Add a table type to a JSON editor #48

Open
chengtie opened this issue Jan 6, 2017 · 1 comment
Open

Add a table type to a JSON editor #48

chengtie opened this issue Jan 6, 2017 · 1 comment
Labels

Comments

@chengtie
Copy link

chengtie commented Jan 6, 2017

I would like to add a Table type along with the existing types (e.g., Text, Boolean), so that users could fill in a table and add it to the JSON object:

screen shot 2017-01-07 at 01 02 22

By adding the following code in addItemTemplate (and some other code) in directives.js, it does show the above table. But I don't know how to do the rest, i.e., adding the instance to the JSON object after pressing the Add button. Note that we could get the data of a handsontable instance from its hot-id like this.

`+ '<span ng-show="$parent.valueType == \'' +tableName+'\'"> : 
 <div ng-controller="MainCtrl as ctrl"><hot-table hot-id="mytable" datarows="ctrl.db.items" height="50" width="100"></hot-table></div>'`

Could anyone give me some hint?

Thanks

Tie

@mb21 mb21 added the question label Jan 6, 2017
@chengtie
Copy link
Author

chengtie commented Jan 7, 2017

PS: here is the entire project I have at the moment: plnkr, all the table-related modifications are in directives.js.

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

No branches or pull requests

2 participants