Skip to content

Instantly share code, notes, and snippets.

@Igosuki
Created August 31, 2016 09:11
Show Gist options
  • Save Igosuki/ad111a13746bb4c0414611d959a44a2f to your computer and use it in GitHub Desktop.
Save Igosuki/ad111a13746bb4c0414611d959a44a2f to your computer and use it in GitHub Desktop.
Add the following to relevant files to get react-select with reagent
(ns core
(:require [cljsjs.react-select]))
(defn my-select []
[:> js/Select {:name "Select"
:value "Tom"
:on-change #(println "Change ! : " %)
:filter-options false
:options [{:value "Tom" :label "Tommy"}
{:value "Tom2" :label "Tommy2"}
{:value "Tom3" :label "Tommy3"}]}])
<link href="css/react-select.min.css" rel="stylesheet" type="text/css">
; A better select field
[cljsjs/react-select "1.0.0-beta14-0" :exclusions [cljsjs/react]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment