Fork me on GitHub
#fulcro
<
2019-10-04
>
henrik09:10:11

Is there some recursive version of remove-ident*? In my case, I have A -> B -> C, where C can be many. I’d like to eliminate all Cs, all edges from B to C, B itself, and the edge from A to B.

henrik09:10:00

(I realize that remove-ident* only removes an edge)

henrik09:10:34

I guess it could also be thought of as removing any C and all edges that point to it, mapped over all Cs for a particular B, then removing B and all edges pointing to it.

henrik09:10:50

A doesn’t necessarily enter into the equation.

henrik10:10:20

(Although that would presume a bidirectional graph)

cjmurphy10:10:38

@henrik Yes there's a function in incubator that does that...

👍 4
henrik10:10:43

Looks like the ticket!

cjmurphy10:10:09

remove-edge which calls it. Yes.

simple_smile 4
henrik11:10:36

remove-edge!, if targeted at A, looks like it’ll clear out all Bs.

henrik11:10:03

If there are multiple B’s, that is.

henrik11:10:18

A regular remove-ident* combined with deep-remove-entity* did the trick. Thanks!

henrik13:10:25

remove-edge! is handy for clearing out Cs from a B though, though I find the naming confusing.

tony.kay15:10:01

@henrik we’re in the process of adding more db tools to f3

👍 4
henrik15:10:29

The above worked itself out though, thanks!

exit215:10:48

In an attempt to upgrade to a react 16 version of FC2, all my defsc component are now throwing this error: Uncaught TypeError: Cannot read property 'call' of undefined After doing some research, I found this is related to the react prop-types library. Does anyone know why this might be happening?

exit216:10:22

Maybe PropTypes.any.isRequired, but I don’t see anywhere in the Fulcro source where we are referring to prop types. Seems to be an common issue when React 16 came out and they made the prop-types package instead of including it. Still doesn’t make sense as to why ALL my defsc components are throwing this error.

currentoor16:10:23

@njj are you using a JS library that uses prop types?

exit216:10:22

Its possible 🙂 This error also points to fulcro.ui.form-state/FormConfig defsc

exit216:10:19

And in some cases on my validators, (def cancel-validator (fs/make-validator cancel-form-valid))