These are chat archives for ractivejs/ractive

4th
Sep 2017
lazylester
@lazylester
Sep 04 2017 20:09
Hello...just want to check something... The API docs say that the get() method "excludes computed properties". This is incorrect, no?
Martin Kolárik
@MartinKolarik
Sep 04 2017 20:09
I think it doesn't include computed when you don't provide an exact keypath
i.e. you do allData = ractive.get()
if you do ractive.get('myComputedProp') then it of course works
oops poorly formatted, but I think you can see it, no?
Martin Kolárik
@MartinKolarik
Sep 04 2017 20:12
indeed, it's included there
it's possible it has changed at some point
Chris Reeves
@evs-chris
Sep 04 2017 20:13
if you get a specific path, it won't include any non-immediate data (links, mostly)
if you get root, it does by default
you can control either with the virtual option e.g. ractive.get({ virtual: false }) to exclude stuff from a root get and ractive.get('some.path.with.child.links', { virtual: true }) to get a composite object
ractive.get({ virtual: false }) returns the actual object underlying the root viewmodel
lazylester
@lazylester
Sep 04 2017 20:15
But this is different from computed attributes, isn't it?
Computed attributes are indeed returned with get()
lazylester
@lazylester
Sep 04 2017 20:22
I've generated a PR
Chris Reeves
@evs-chris
Sep 04 2017 20:51
computeds are considered virtual in addition to links and mappings
lazylester
@lazylester
Sep 04 2017 20:58
Help me here... is it possible to modify a PR once it's submitted?
Martin Kolárik
@MartinKolarik
Sep 04 2017 20:59
yes, you can keep updating the same branch
lazylester
@lazylester
Sep 04 2017 20:59
in my own fork, you mean?
Martin Kolárik
@MartinKolarik
Sep 04 2017 20:59
yes
lazylester
@lazylester
Sep 04 2017 21:00
OK, let me try that.
Chris Reeves
@evs-chris
Sep 04 2017 21:00
you can also modify existing commits on a PR of you don't mind getting a little dirty with the reflog
I commented on the issue
lazylester
@lazylester
Sep 04 2017 21:01
saw you comment, Chris, that's why I'm trying to re-do the PR.
lazylester
@lazylester
Sep 04 2017 21:21
OK, I think I got it. Submitted a PR update, including example per @ceremcem suggestion.
Cerem Cem ASLAN
@ceremcem
Sep 04 2017 21:43
would it be helpful if we'd a "checklist for adding examples" document?