mirror of
https://github.com/rowtype-yoga/ry-blocks.git
synced 2024-09-17 16:27:33 +03:00
Make select properly controlled
This commit is contained in:
parent
2015e4ab6c
commit
475dbc6b37
6
.idea/tailwindcss.xml
Normal file
6
.idea/tailwindcss.xml
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="TailwindSettings">
|
||||
<option name="lspConfiguration" value="{ "includeLanguages": { "purescript": "html" }, "[purescript]": { "tailwindCSS.experimental.classRegex": [ "\\bclassName:\\s+\"([^\"]*)\"" ] }, "files": { "exclude": [ "**/.git/**", "**/node_modules/**", "**/.hg/**", "**/.svn/**" ] }, "emmetCompletions": false, "classAttributes": ["class", "className", "ngClass"], "colorDecorators": false, "showPixelEquivalents": true, "rootFontSize": 16, "hovers": true, "suggestions": true, "codeActions": true, "validate": true, "lint": { "invalidScreen": "error", "invalidVariant": "error", "invalidTailwindDirective": "error", "invalidApply": "error", "invalidConfigPath": "error", "cssConflict": "warning", "recommendedVariantOrder": "warning" }, "experimental": { "configFile": null, "classRegex": [] } }" />
|
||||
</component>
|
||||
</project>
|
@ -18,7 +18,7 @@ type Props a =
|
||||
|
||||
component ∷ ∀ a. ReactComponent (Props a)
|
||||
component = unsafePerformEffect do
|
||||
React.reactComponent "Select" \{ toString, toValue, choices, onChange } →
|
||||
React.reactComponent "Select" \{ toString, toValue, choice, choices, onChange } →
|
||||
React.do
|
||||
pure $
|
||||
div "input-container" Style.container
|
||||
@ -27,6 +27,7 @@ component = unsafePerformEffect do
|
||||
{ className: "select"
|
||||
, role: "listbox"
|
||||
, css: Style.select
|
||||
, value: toValue choice
|
||||
, onChange: handler targetValue
|
||||
\maybeVal → traverse_ onChange do
|
||||
val ← maybeVal
|
||||
|
Loading…
Reference in New Issue
Block a user