Fork me on GitHub
#fulcro
<
2021-12-15
>
bmaddy17:12:34

I'm trying to create a picker in RAD for keywords that populates with a remote endpoint. Installing this

(form/install-field-renderer! app :keyword :pick-one entity-picker/to-one-picker)
and setting ::picker-options/query-key and ::picker-options/options-xform worked great with one exception: the selected keyword doesn't display (even though it displays in the dropdown list). Everything else works great (loading data from the endpoint, rendering items in the list, saving, etc.). Looking through the code (https://github.com/fulcrologic/fulcro-rad-semantic-ui/blob/01c4f07b4367c7f8ab015218eecd6beeb16496f7/src/main/com/fulcrologic/rad/rendering/semantic_ui/components.cljc#L54), I see a format-value might be relevant, but I haven't figured out how to set it yet. Would it make more sense to use com.fulcrologic.rad.rendering.semantic-ui.controls.pickers/SimplePicker for keywords? If so, does anyone have an example of how it is used? I haven't been able to figure out what props to pass in.

bmaddy22:12:17

I'm starting to think writing a new component is the most correct way to go here. For a quick fix I'm having luck with the autocomplete widget even though it does more requests than I actually need. 🙂

tony.kay00:12:42

Yeah, I think I needed that the other day as well, and ended up using autocomplete, too. If you want to write the control and contribute it, great 😄

bmaddy04:12:24

Great, it's nice to know I'm heading the right direction! If I have time at the end of this POC I'll try to circle back and see if I can contribute one.

AJ Snow20:12:20

Wrong number of args (2) passed to: com.fulcrologic.fulcro-css.localized-dom/emit-tag
It looks like localized-dom may have made some changes in newer versions. Are these changes reflected in the docs?

tony.kay00:12:26

Honestly no idea. I don't use that at all anymore, and have not touched it in quite some time.

AJ Snow00:12:03

I use it to make my tags in the code. Is there a different library fulcro uses for that now?

tony.kay06:12:54

no, I just don't embed css in my code. Not saying there is anything wrong with it...just saying I don't know the answer to your question off the top of my head. You'll have to use the source and such.

👍 1