Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support React 15.x #44

Open
6 tasks done
jbinto opened this issue May 13, 2016 · 5 comments
Open
6 tasks done

Support React 15.x #44

jbinto opened this issue May 13, 2016 · 5 comments
Assignees

Comments

@jbinto
Copy link
Contributor

jbinto commented May 13, 2016

Frig/Frigging Bootstrap currently works okay on React 15.0.x but there are several deprecations/warnings:

valueLink deprecation

  • valueLink prop on input is deprecated; set value and onChange instead
  • valueLink prop on select is deprecated; set value and onChange instead
  • valueLink prop on textarea is deprecated; set value and onChange instead

numeric string values for CSS properties

  • a div tag (owner: FriggingBootstrap.Switch) was passed a numeric string value for CSS property marginLeft (value: 0) which will be treated as a unitless number in a future version of React.

color picker

n.b. These propTypes errors are probably unrelated to the upgrade

  • Failed propType: Invalid prop startDragging of type function supplied to HueSlider, expected boolean. Check the render method of Draggable.
  • Failed propType: Invalid prop startDragging of type function supplied to ColorMap, expected boolean. Check the render method of Draggable.
@jbinto
Copy link
Contributor Author

jbinto commented May 17, 2016

See frig-js/frig#128 for Frig work

@jbinto
Copy link
Contributor Author

jbinto commented May 26, 2016

null select example issue

  • Issue: In examples, when changing something in the "null select example", there is this warning:
warning.js?8a56*:44 Warning: `value` prop on `select` should not be null.
Consider using the empty string to clear the component or `undefined` 
for uncontrolled components.

@jbinto
Copy link
Contributor Author

jbinto commented May 26, 2016

For the "null select example" issue:

Tried changing this in Frig's value_linked_select.js:

-    if (el.value === '') return null
+    if (el.value === '') return ''

Now, if I select the null value "Things" (see kitchen-sink.jsx excerpt below), it won't stay selected, it snaps back to "Stuff":

            <Input
              name="select_null_value_example"
              options={[
                { label: 'Stuff', value: null },
                [null, 'Things'],
                'why not both?',
              ]}
            />

If I leave the code alone, it works (keeps "Things" selected) but React will warn.

@jbinto
Copy link
Contributor Author

jbinto commented May 26, 2016

inputs switching between controlled/uncontrolled

  • When typing in any input, the following warning:
Warning: FriggingBootstrap.Input is changing a uncontrolled input
of type text to be controlled. Input elements should not switch from
uncontrolled to controlled (or vice versa). Decide between using a
controlled or uncontrolled input element for the lifetime of the 
component.

edit: Fixed in frig-js/frig@4e9d132

@jbinto
Copy link
Contributor Author

jbinto commented May 26, 2016

clearing/blanking input event issue

Another issue, this one needs to be seen to be believed:

  • When clearing any input, (e.g. type "abc", then backspace 3 times), the input changes to "[object Object]" and a bunch of React event errors are thrown

out3

edit: Fixed in frig-js/frig@144e746

jbinto added a commit to frig-js/frig that referenced this issue May 26, 2016
Fixes the following warning:

```
Warning: FriggingBootstrap.Input is changing a uncontrolled input
of type text to be controlled. Input elements should not switch from
uncontrolled to controlled (or vice versa). Decide between using a
controlled or uncontrolled input element for the lifetime of the
component.
```

frig-js/frigging-bootstrap#44 (comment)
jbinto added a commit to frig-js/frig that referenced this issue May 26, 2016
See frig-js/frigging-bootstrap#44 (comment) for more info

Basically, if onChange had to handle a SyntheticEvent where e.target.value is null, we would use
the SyntheticEvent incorrectly as the actual value
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants