Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ServerPicker: Should always set selectedServers to array #42

Open
osbornm opened this issue May 5, 2016 · 1 comment
Open

ServerPicker: Should always set selectedServers to array #42

osbornm opened this issue May 5, 2016 · 1 comment
Assignees
Labels
Milestone

Comments

@osbornm
Copy link
Contributor

osbornm commented May 5, 2016

Currently when multi-Select is false selectedServers is set to an object not an array of one object. This is confusing.

@osbornm osbornm self-assigned this May 5, 2016
@osbornm
Copy link
Contributor Author

osbornm commented May 12, 2016

We wont be fixing this until v2.0.0 because it is a potential breaking change. Here is a simple computed you can use to work around with issue along with a jsFiddle example

ko.pureComputed(function(){
  var result = self.selectedServers();
   if(Array.isArray(result))
     return result;
    else
      return [result]; 
});

https://jsfiddle.net/oe2vp5u3/3/

@osbornm osbornm added the bug label Jun 9, 2016
@osbornm osbornm added this to the v2.0.0 milestone Jun 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant