Permalink
Browse files

Merge pull request #60 from dansterrett/master

Modified the picker cell's setValue method to take an optional 'text' parameter.
  • Loading branch information...
2 parents a3c95c4 + e90c531 commit 2dd2e899e617de15751ed88587572e262d6e2856 @justindarc justindarc committed May 1, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 pushpop-tableview/pushpop-tableview.js
@@ -366,7 +366,7 @@ if (!window['Pushpop']) window.Pushpop = {};
var text = self.getTextByValue(valueHierarchy);
if (self.isMultiple) {
- self.setValue(valueHierarchy, true);
+ self.setValue(valueHierarchy);
$element.trigger($.Event(Pushpop.EventType.DidAddValue, {
cellElement: element,
$cellElement: $element,
@@ -466,12 +466,12 @@ if (!window['Pushpop']) window.Pushpop = {};
getValue: function() {
return this._value;
},
- setValue: function(value) {
+ setValue: function(value, text) {
var element = this.element;
var $element = this.$element;
var $tableViewElement = this.tableView.$element;
var isMultiple = this.isMultiple;
- var text = this.getTextByValue(value);
+ text = text || this.getTextByValue(value);
if (isMultiple) {
for (var i = 0, length = this._value.length; i < length; i++) if (this._value[i] == value) return;

0 comments on commit 2dd2e89

Please sign in to comment.