{"action":"created","issue":{"url":"https://api.github.com/repos/OutWatch/outwatch/issues/1","repository_url":"https://api.github.com/repos/OutWatch/outwatch","labels_url":"https://api.github.com/repos/OutWatch/outwatch/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/OutWatch/outwatch/issues/1/comments","events_url":"https://api.github.com/repos/OutWatch/outwatch/issues/1/events","html_url":"https://github.com/OutWatch/outwatch/issues/1","id":191019138,"number":1,"title":"List displaying strings does not update correctly","user":{"login":"matthhan","id":12532492,"avatar_url":"https://avatars.githubusercontent.com/u/12532492?v=3","gravatar_id":"","url":"https://api.github.com/users/matthhan","html_url":"https://github.com/matthhan","followers_url":"https://api.github.com/users/matthhan/followers","following_url":"https://api.github.com/users/matthhan/following{/other_user}","gists_url":"https://api.github.com/users/matthhan/gists{/gist_id}","starred_url":"https://api.github.com/users/matthhan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthhan/subscriptions","organizations_url":"https://api.github.com/users/matthhan/orgs","repos_url":"https://api.github.com/users/matthhan/repos","events_url":"https://api.github.com/users/matthhan/events{/privacy}","received_events_url":"https://api.github.com/users/matthhan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-11-22T14:17:51Z","updated_at":"2016-11-22T14:35:54Z","closed_at":null,"body":"```\r\nimport outwatch.dom._\r\nimport outwatch.Sink\r\nimport scala.scalajs.js.JSApp\r\nimport rxscalajs.Observable\r\nobject BugList extends JSApp {\r\n  def main():Unit =  {\r\n    //Make an observable that emits two item lists\r\n    val itemLists = Observable.of(\r\n      List(\"hello\",\"world\",\"!\"),\r\n      List(\"world\",\"!\")\r\n    )\r\n    //Make a Sink that prints the items lists to console as they are emitted\r\n    val listsSink = Sink.createSink { lis:List[String] => println(lis) }\r\n    listsSink <-- itemLists\r\n      \r\n    //Map the item lists to lists of html li elements\r\n    val htmlItemLists = itemLists.map{ lis => lis.map { item => li(children := Seq(item)) } } \r\n\r\n    //bind the li elements as children of an ul\r\n    val node = ul(children <-- htmlItemLists)\r\n\r\n    OutWatch.render(\"#app\",node)\r\n  }\r\n}\r\n```\r\nThis code should intuitively end up displaying a html list that contains the items \"world\" and \"!\". However, it actually displays a list containing \"hello\" and \"world\". Printing the original lists to the console yields a correct result, so I think this might be a bug in the implementation of the virtual dom?"},"comment":{"url":"https://api.github.com/repos/OutWatch/outwatch/issues/comments/262256368","html_url":"https://github.com/OutWatch/outwatch/issues/1#issuecomment-262256368","issue_url":"https://api.github.com/repos/OutWatch/outwatch/issues/1","id":262256368,"user":{"login":"LukaJCB","id":9531747,"avatar_url":"https://avatars.githubusercontent.com/u/9531747?v=3","gravatar_id":"","url":"https://api.github.com/users/LukaJCB","html_url":"https://github.com/LukaJCB","followers_url":"https://api.github.com/users/LukaJCB/followers","following_url":"https://api.github.com/users/LukaJCB/following{/other_user}","gists_url":"https://api.github.com/users/LukaJCB/gists{/gist_id}","starred_url":"https://api.github.com/users/LukaJCB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LukaJCB/subscriptions","organizations_url":"https://api.github.com/users/LukaJCB/orgs","repos_url":"https://api.github.com/users/LukaJCB/repos","events_url":"https://api.github.com/users/LukaJCB/events{/privacy}","received_events_url":"https://api.github.com/users/LukaJCB/received_events","type":"User","site_admin":false},"created_at":"2016-11-22T14:35:54Z","updated_at":"2016-11-22T14:35:54Z","body":"Thank you for adding this issue :) \r\nI'm not exactly sure what you're trying to do here. Why are you trying to wrap each individual item inside a Seq? Instead of a `li(children := Seq(item))` wouldn't it make more sense, to just have a `li(item)`? \r\n\r\nThe underlying problem however, might be that `children` doesn't really work that well with `:=`. I'm considering just removing that feature all together, since you can pass a `Seq` into varargs anyway. \r\n\r\nSo in the future instead of writing `li(children := list)` you could only write `li(list: Seq: _*)` to expand the `Seq` to the varargs. \r\n\r\nI'll look into what exactly might be causing this, though and come back to you!"}}
{"actor":{"display_login":"LukaJCB"}}