This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-05-07
Channels
- # announcements (32)
- # asami (1)
- # babashka (127)
- # beginners (135)
- # bristol-clojurians (1)
- # calva (21)
- # chlorine-clover (5)
- # cider (2)
- # clara (9)
- # clj-kondo (24)
- # cljsrn (2)
- # clojure (25)
- # clojure-australia (4)
- # clojure-europe (135)
- # clojure-nl (8)
- # clojure-russia (3)
- # clojure-spec (4)
- # clojure-uk (9)
- # clojurescript (55)
- # cursive (6)
- # datomic (62)
- # events (1)
- # fulcro (1)
- # helix (19)
- # jobs (3)
- # jobs-rus (1)
- # kaocha (8)
- # malli (6)
- # meander (3)
- # off-topic (2)
- # pathom (3)
- # podcasts-discuss (1)
- # polylith (3)
- # practicalli (3)
- # re-frame (4)
- # reitit (5)
- # remote-jobs (1)
- # reveal (1)
- # rewrite-clj (9)
- # ring-swagger (1)
- # shadow-cljs (59)
- # xtdb (4)
I have an issue that I don't know what to do with. https://material-ui.com/components/autocomplete/#combo-box check that they rely on the ordering of the props
<TextField {...params} label="Combo box" variant="outlined" />
anything passed after ...params overwrites what params had with the same name. How can I do this with helix?I think I can do js/Object.assign but the more I think about it the more I want to avoid the whole issue, this shouldn't be needed
@quilesbaker as I explicitly stated in my question, it is important to notice that the order in the example is not the same as the one used by the spread macro, which I was using already, btw.
would be nice to have an online playground to try it out though, as far as I can remember, if I didn't put the & args
pair at the end, it didn't work
and now I am having an even weirder problem, a maxWidth prop only works if I pass it as string, if I pass it bound to a symbol, then it doesn't. I feel like i need some days off.
@ashnur Are params coming in as a cljs map via bean? Could you just do ($ TextField {:& (merge params {:label …})})
? Or maybe use bean itself?
no, these are passed here, and yes, this is the last time I use this component https://github.com/mui-org/material-ui/blob/33850e52ca32787fbc02b64d3225bac2d451612c/packages/material-ui/src/Autocomplete/Autocomplete.js#L584
helix's spread props and props conversion to a JS object only works on the first level of the TextField
props map. so the :InputProps
needs to be handled just like you did