Skip to content
Snippets Groups Projects
Commit 87cd4157 authored by Hermann's avatar Hermann
Browse files

update documentation of tableView

parent cb52d160
No related branches found
No related tags found
No related merge requests found
...@@ -33,16 +33,13 @@ export default class TableView { ...@@ -33,16 +33,13 @@ export default class TableView {
/* Shows a table of objects for a given API resource. /* Shows a table of objects for a given API resource.
* *
* Required attributes: * Required attributes:
* - resource: a string of the API resource to display, e.g. 'users' * vnode: { attrs: { controller, titles, keys } }
* - controller: a listcontroller for some API resource data
* - titles: the titles of the table
* - keys: Keys of this resource to display as columns, e.g. ['firstname'] * - keys: Keys of this resource to display as columns, e.g. ['firstname']
* Works with embedded resources, i.e. if you add * Works with embedded resources, i.e. if you add
* { embedded: { event: 1 } } to a list of eventsignups, * { embedded: { event: 1 } } to a list of eventsignups,
* you can display event.title_de as a table key * you can display event.title_de as a table key
* Addutional attirbutes:
* - query: A query object that is valid accoring to
* http://python-eve.org/features.html#Filtering
* https://docs.mongodb.com/v3.2/reference/operator/query/
* e.g. : { where: {name: somename } }
*/ */
constructor({ attrs: { keys } }) { constructor({ attrs: { keys } }) {
this.search = ''; this.search = '';
...@@ -99,7 +96,7 @@ export default class TableView { ...@@ -99,7 +96,7 @@ export default class TableView {
updateList(); updateList();
}, },
}, },
fullWidth: true, fullWidth: false,
}), }),
m(Button, { m(Button, {
className: 'blue-button', className: 'blue-button',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment