Sort using mutation.parent property
See original GitHub issueCurrently sort_tables
doesn’t ensure mutations occur after their parents. It probably should, but this behvaior is documented, so it’s not major.
This is a way that tables can be out of order that sort_tables
does not fix, so we should probably address it, although we don’t have a use case that produces tables out of order in this way.
The only way I can think of to do this is to add a field to the mutation struct used for sorting that is “number of hops to the root”, computed by following mutation.parent
indices until you hit a -1
.
Issue Analytics
- State:
- Created 5 years ago
- Comments:9 (7 by maintainers)
Top Results From Across the Web
Notifying parent when particular property of Struct is mutated ...
Any property changes of a struct would cause the struct itself being replaced by a new one (copied from it with the updated...
Read more >How exactly do you update an array in the cache after a ...
Hi, after executing a query getItems, it returns an array of Items which consist of an _id and title, and this appears in...
Read more >Virtual field orderBy doesn't sort correctly · Issue #2400 - GitHub
In server land I used to be able to add a new method to a "model class" ... errors: updateErrors } = await...
Read more >Mutation isn't always bad in JavaScript - DEV Community
Let's consider the following (bad) use of mutation: ... Finally, we mutate the parent's children property to add the current element to it....
Read more >Vue Error: Avoid Mutating a Prop Directly - Michael Thiessen
Instead, use a data or computed property based on the prop's value. ... Changing the value in a child component won't change it...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Ping @Chris1221 as an issue that could probably be tackled along with https://github.com/tskit-dev/tskit/issues/117 (I would find it useful if this issue were solved)
Probably not for 0.6.1 I’d say — shall we create a 0.6.2 milestone and add it to that?