Fork me on GitHub
#fulcro
<
2020-06-15
>
bbss02:06:22

I've hit that tempid error a lot as well @ericihli Usually it works to re-install the chrome extension..

Eric Ihli02:06:58

Just tried that. No effect.

bbss03:06:52

if you are using testdata still, then maybe clearing your db might help.. Next time I run into it I'll try to make sure I know why and create an issue on the inspect github. I've seen more people run into it here.

lgessler05:06:19

hi, i have a newb question about the code that goes along with video #4. specifically i'm wondering about https://github.com/fulcrologic/video-series/blob/dom%2Breact/src/app/client.cljs#L64L69: Sample's initial state is {:root/people {}}, but when I (comp/get-initial-state Sample) I get the full data tree {root/people {:person-list/people [...]}}. I thought get-initial-state should have given me the former, but why'd it give me the latter?

Jakub Holý (HolyJak)08:06:01

because it is not literal data but the template form, which fulcro replaces with :root/people (comp/get-initial-state PersonList) - see http://book.fulcrologic.com/#_template_mode

👍 3
lgessler19:06:14

makes sense, thanks!

zilti17:06:36

I have a question about the field-formatters for RAD reports: the example in the docstring gives as an example a link to edit the form (basically what ro/form-links does). But the example is not functional, and there also seems to be no way inside a field-formatter to find out what row I am on?

Jakub Holý (HolyJak)17:06:23

Perhaps you need to provide your own row component if you need more info than the formatter gets

zilti17:06:44

Well according to the docstrings, that info is supposed to be available. So I wonder if I did something wrong.

tony.kay18:06:10

could be a regression. It’s a lot of spinning wheels to keep track of

tony.kay18:06:33

all things in demo should work, so if something is not working pls open issue on demo. thx

tony.kay18:06:08

look through demo for a usage of the pattern, see if it works, and if so, let me know if the docstring is just wrong.

zilti00:06:37

It isn't used in the demo, but it is in the docstring of ro/field-formatters

zilti10:06:09

My usecase is that I'd like to have a dropdown on the report. With the functionality described in the docstring, that would be possible without defining a separate row component.

tony.kay13:06:21

dropdown on the overall Report (shown in the demo), or on a Report Row? I would suggest you use the source. The rendering is not terribly complex, and it is intended that you extend it as needed. A dropdown on a row might be harder if you want the options to somehow be filled from a server query…for that you’ll probably want to use hooks/floating roots.

zilti13:06:07

A dropdown in a row cell, with pretty much the technique described in the ro/field-formatters docstring. Making the dropdown and having the current value pre-selected is easy, but since, inside a function called by the field formatting functionality, I have no way to know which row I am on, it is impossible to use the dropdown to actually change the value

tony.kay15:06:27

ah, I see…so we have a function signature problem

tony.kay15:06:50

ugh, yeah, that function signature should be different…and that is a breaking change

tony.kay15:06:07

I guess I could invent a new name and deprecate that one

tony.kay15:06:45

cell-formatter?

tony.kay15:06:25

or, I could add additional arguments to the current one, though that is kinda ugly….`(fn [report-instance value row-props attr] …)`

tony.kay15:06:38

value in that case is superfluous, since it is in row-props, but since js won’t care about arity at runtime, it would probably just work.

tony.kay15:06:17

I’ll do the latter for the moment…will push a snapshot in a moment @U2APCNHCN

zilti15:06:39

Awesome! 😄 Yes, cell-formatter sounds like a reasonable name

tony.kay15:06:54

0.0.14-alpha-SNAPSHOT on clojars

tony.kay15:06:05

same old name, more args

tony.kay15:06:33

I also fixed the attribute level override…it wasn’t being honored