ivaynberg/select2 — pull request #73 by apepper (2012-05-31 15:59:59+00:00)
Title: Adds an additional parameter roundtripValue to function data.

Enables a stored value, which can be passed by the function `result` to the next call of the function `data`.

This is a solution for issue ivaynberg/select2#72 .

Example:

```javascript
data: function (term, page, roundtripValue) {
var options = {
q: term,
limit: 5,
};
if (typeof(roundtripValue) !== 'undefined' && roundtripValue != null) {
options['continuation_handle'] = roundtripValue;
}
return options;
},
results: function (data, page) {
var roundtripValue = data.continuation_handle;
var more = typeof(roundtripValue) !== 'undefined';
return {results: data.results, more: more, roundtripValue: roundtripValue};
},
```