fulcro

Book: http://book.fulcrologic.com, Community Resources: https://fulcro-community.github.io/, RAD book at http://book.fulcrologic.com/RAD.html
Mr. Savy 2020-12-21T01:51:29.211100Z

does anyone know of any fulcro or om.next implementation of infinite scroll functionality?

tony.kay 2020-12-21T18:50:13.219600Z

Same basic logic as in the pagination demo in the book…just don’t do it as pages (append the new items instead), and trigger on scrolls. https://book.fulcrologic.com/#_paginating_large_lists

👍 1
JAtkins 2020-12-21T02:06:37.211200Z

What do you mean? Maybe I'm being naive, but could you not just use fulcro load!s triggered when hitting the bottom of the page? Maybe have them parameterized so the server knows how many segment's you've already loaded?

Mr. Savy 2020-12-21T02:10:04.211400Z

yeah that's not a bad idea. So I'd need to figure out how to load the first item(s), then add a mutator to when the page hits the bottom, then figure out how to load the next items and which ones need loaded, and then maybe have a handler for when there are no more items? hmm, this sounds like it may take some time.

JAtkins 2020-12-21T02:20:33.211600Z

The initial load is relatively standard for fulcro. Depending on your app, that would be something that happens on page load, dynamic router events, or state machine events. Running raw load! s with segments-loaded parameter and post-mutation might do the trick for the rest of your needs.

JAtkins 2020-12-21T02:21:16.211800Z

Of course, building a custom mutation for loading this would also not be very hard. Especially with built in ok-action and error-action

JAtkins 2020-12-21T02:27:52.212100Z

I dunno. I could also be totally glossing over something important here that makes this hard.

Mr. Savy 2020-12-21T02:27:53.212300Z

ok, I will see if I can figure this out based on your suggestions. Thank you!

JAtkins 2020-12-21T02:28:07.212500Z

np, hopefully it's helpful

stuartrexking 2020-12-21T10:00:55.215100Z

When is the best time to start a uism? Say I have a signup flow that uses a uism, should I start the uism just before I route to the Signup, or should I start it when the app starts up? The template starts the login dialog uism when the app starts, but I think I’d prefer it on demand when required. Thoughts?

2020-12-21T10:14:44.215200Z

imo what is the best depends on the state itself. For session uism where Signup is a part of, you usually want to start it with the app because checking if user has logged in is required in many ui components. If that's not your case then putting it in will-enter sounds fine

👆 1
stuartrexking 2020-12-21T10:55:04.215400Z

Ok thanks.

2020-12-21T11:24:23.215600Z

I am also running into this a bunch lately. It's a question of lifecycle of the state-machine. Do you want it to persist between view switches or not, is it expensive to run at that moment etc. I tie a lot of state machines to the components themselves, with react hooks and useEffect . But the router sounds like a good place to interact with uism too.

tony.kay 2020-12-21T18:51:55.219900Z

I agree with both of the above…UISM is a generic tool: you start them when it make sense for the usage at hand. It also doesn’t hurt to start them early…they take little space and no CPU.

JAtkins 2020-12-21T19:08:17.220900Z

Is there any blocking issue for blob uploads and rad? I see a ;; Note: not quite done yet in the demo, but everything appears fine.

wilkerlucio 2020-12-21T21:05:08.222Z

hello, question in RAD, I'm trying to find example of how to make a form field as a select, based on some database information, its to select one other entity on the system, is there an example of that (I couldn't find on the RAD docs)?

✅ 1
wilkerlucio 2020-12-22T20:08:02.260900Z

figured out, was missing adding the attributes in the attribute list at the end of file :man-facepalming: