madvas / cljs-react-material-ui

Clojurescript library for using material-ui.com
Eclipse Public License 1.0
205 stars 32 forks source link

Radio Button Group & Radio Buttons (Reagent) broken after upgrading from 0.2.21 to 0.2.25 #19

Closed tkataja closed 7 years ago

tkataja commented 7 years ago

Hi,

Another broken component after updating from 0.2.21 to 0.2.25.

Steps to Reproduce

Create a new Reagent frontend project:

lein new reagent-frontend material-ui-radio-button

Add exclusions to reagent and add cljs-react-material-ui dependency to project.clj

[reagent "0.6.0" :exclusions [cljsjs/react]]
[cljs-react-material-ui "0.2.25"]

Open _src/material_uiradio\button/core.cljs_, add deps and modify home-page fn to render simple radio button group

(:require [reagent.core :as reagent]
               ;; Add material ui deps
               [cljsjs.material-ui]
               [cljs-react-material-ui.core :as uic]
               [cljs-react-material-ui.reagent :as ui])

;; modify the home page
(defn home-page []
  [ui/mui-theme-provider {:mui-theme (uic/get-mui-theme)}
   [ui/radio-button-group {:name "test"}
    [ui/radio-button {:value "foo" :label "Foo"}]
    [ui/radio-button {:value "bar" :label "Bar"}]]])

Start figwheel

lein figwheel

Open the app (located in material-ui-radio-button/public/index.html) and following error should appear in the console and the radio buttons are not functioning

material-ui.inc.js:2464 Warning: Unknown prop `argv` on <input> tag. Remove this prop from the element. For details, see https://fb.me/react-unknown-prop
    in input (created by EnhancedSwitch)
    in div (created by EnhancedSwitch)
    in EnhancedSwitch (created by RadioButton)
    in RadioButton (created by RadioButtonGroup)
    in div (created by RadioButtonGroup)
    in RadioButtonGroup (created by ReagentInput)
    in ReagentInput (created by ReagentInput)
    in MuiThemeProvider (created by ReagentInput)
    in ReagentInput (created by material_ui_tabs.core.home_page)
    in material_ui_tabs.core.home_page

After downgrading to 0.2.21, radio button group works great