Fork me on GitHub

Q: what’s the go-to for an auto-complete/typeahead in re-frame? I’m testing Google Closure and NPM (because I’m using shadow) but wondering if I’m missing another good/better option


@steveb8n react-select here


that gives me confidence 🙂


It seems to have a lot of features and a lot of ability to be extended. It did have a pretty ground-up rewrite in to bring it to it’s current version. I have migrated from the old to the new and think it’s reasonable still.


It seemed to be about the best I could find when I was looking around. Seems like quite an active project.


I’m having the same experience now. learning the 2.4 interop. I’m glad I only do this once


got it working now. new version is really clean


Yeah. I think the new version is an improvement. It seems to be a well thought out API.


Found one issue with it. On-change handlers get the value instead of the underlying js event. I can see why but it breaks when used with other libs that's expect events. I had to add a fake "target" to the options to make it work with the free-form lib


should re-frame-10x work with modules? I’m seeing errors with 10x in the stacktrace and they appear before cljs_base has been loaded…


oh, I guess it’s a more general problem, I missed the hint about modules only being supported with optimizations #{:simple :advanced}


Modules should work with any optimization settings in recent cljs versions, and we at Workshub are using re-frame-10x successfully with them


@dj942 right, turns out clearing the output folder fixed my issue… caching things.


hey friends, I need to figure out “jump to next input on Enter” thing, does anyone know how to get next-sibling with reagent/re-frame?


in on-key-up event


oh.. I guess my problem is because we’re using material-ui, I have to go .target.parentElement.parentElement.parentElement.parentElement.nextSibling and that gives me a container where input may or may not be located.


is there easy way to search DOM from where you are for the next input element with the tab index +1 of current input?


(defn- find-next-tab-stop
  "finds next DOM element in the tabindex chain"
  (let [universe (js/document.querySelectorAll "input, button, select, textarea, a[href]")
        list (js/ universe #(<= 0 (.-tabIndex %)))
        idx (.indexOf list el)]
    (get list (+ 1 idx) (get list 0))))