Permalink
Browse files

Docs

  • Loading branch information...
1 parent dcff53a commit f74af4be73ae510d6dea7786009a993543a6aa09 @powmedia committed Sep 8, 2011
Showing with 14 additions and 0 deletions.
  1. +14 −0 README.md
View
@@ -200,6 +200,20 @@ Creates a sortable and editable list of items, which can be any of the above sch
- Similar in use to the main 'type' schema attribute.
- Defaults to 'Text'
+**`toString`**
+
+- Optional, but recommended when using listType 'Object'
+- A function that returns a string representing how the object should be displayed in a list item.
+- When listType is 'NestedModel', the model's toString() method will be used
+
+Examples:
+
+ var schema = {
+ users: { type: 'List', listType: 'Object', toString: function(user) {
+ return user.firstName + ' ' + user.lastName;
+ }
+ }
+ };

0 comments on commit f74af4b

Please sign in to comment.