Skip to main content
Version: 1.x.x

Mutators

quip.apps.RecordList.prototype

add

Function(props: {[prop: string]: any}, index?: number) => quip.apps.Record

This creates a new Record and adds it to this RecordList. We use the list type definition to determine what type of Record to create from the fields in the value. If index is not specified, the Record is appended to the end of the list.

Returns the newly created Record.

move

Function(record: quip.apps.Record, index: number) => boolean

Moves the given record to a new index in the list. If record is not currently in this list, it will add this Record to the list (and remove it from the list it currently lives in, if there is one). If record is currently the property of another Record object, this returns false and does not execute the move.

To move children between Record (not RecordList) parents, you will need to call parent.clear(recordProp, /* skipDelete */ true) before calling this method, so your record is correctly orphaned before it is reparented.

remove

Function(record: quip.apps.Record, skipDelete: boolean=false) => boolean

Removes the given Record from this list. Deletes the removed record unless skipDelete is true. In general, skipDelete is only useful when moving a record from one list to another using move.

delete

Function() => void

Deletes this list. Also deletes all Record objects in this list.