Commit Graph
496 Commits
Author SHA1 Message Date
WU Jun 9a4a8aa71a Do not automatically select other options
For <select multiple />, `value` is an array and should not be
converted to a string.
2013-12-21 01:04:31 +08:00
Pete Hunt 294bac537d Merge pull request #668 from nicholasbs/fix-docs-typo
Fix typos
2013-12-17 18:39:14 -08:00
Tim YungandPaul O’Shannessy 41230ef5dd A new helper for tests: createHierarchyRenderer
We aren't using this in any of the React tests, but we've found it
useful testing product code.
2013-12-17 18:07:53 -08:00
Thomas Aylott 7f3d4f0340 fixes ReactTextComponent rootID unescapedness 2013-12-17 05:07:49 -05:00
Thomas Aylott 346c8f5e6e test case for ReactTextComponent rootID escaping 2013-12-17 05:05:28 -05:00
Nicholas Bergson-Shilcock 93eb6a5637 Fix typo in comments (ot -> to) 2013-12-15 12:12:38 -05:00
Paul O’Shannessy 5a5137ded4 Merge pull request #651 from fabiomcosta/patch-2
Improving never seen error message
2013-12-13 10:23:46 -08:00
Paul O’Shannessy c2920ba84c Merge pull request #653 from fabiomcosta/patch-3
match -> test
2013-12-12 15:33:31 -08:00
Fabio M. Costa 39037eedd1 URL -> url 2013-12-12 15:29:29 -08:00
Ben Newman 7c95194ec0 Merge pull request #637 from cpojer/use-rest-params
Use Rest Parameters where it makes sense
2013-12-12 14:53:50 -08:00
Josh DuckandPaul O’Shannessy 8b0af9b5de Fix SelectEventPlugin
mouseup was not fired when context menu showed, so select events stopped being fired.
2013-12-11 13:46:11 -08:00
Tim YungandPaul O’Shannessy 02de96f012 Fix Merging propTypes, contextTypes, and childContextTypes
This fixes merging of `propTypes`, `contextTypes`, and `childContextTypes` so that we actually merge (instead of only taking the component or last mixin).
2013-12-11 13:45:55 -08:00
Ben Alpert e92ce38cf1 Add loop property 2013-12-11 11:46:16 -08:00
cpojer decb49a202 Use rest parameters whenever it makes sense. 2013-12-11 10:30:10 -08:00
Fabio M. Costa c7129fd377 match -> test
Using RegExp method `test` because this is what is wanted
2013-12-11 00:43:31 -08:00
Fabio M. Costa 4b3fa413a1 Improving never seen error message
Removing repeating "support it" and fixing camelCase method name
2013-12-10 21:07:41 -08:00
Paul O’Shannessy 80e0e2a13f Clean trailing space and lint 2013-12-09 15:54:16 -08:00
Paul O’Shannessy 5c65abfbac Merge remote-tracking branch 'syranide/textarearows' 2013-12-09 15:51:38 -08:00
Paul O’Shannessy 153b75f186 Bump version to 0.9.0-alpha
This is trunk, which will be 0.9. We'll have to cherry-pick this whole
thing into a 0.8 branch.
2013-12-06 15:11:25 -08:00
petehuntandPaul O’Shannessy ef339c9cc4 Version bump, make tests work 2013-12-06 11:56:30 -08:00
Paul O’Shannessy 9270d3d56e Merge pull request #592 from spicyj/guard-fn
ReactErrorUtils: In prod, just return the original
2013-12-06 11:31:02 -08:00
Paul ShenandPaul O’Shannessy 12e765dd27 Revert "Don't mutate passed-in props"
This reverts https://github.com/facebook/react/pull/576

This approach mutates the default props for the instance on each update,
which causes incorrect behavior. discussed with @balpert. can look into
cloning but this unbreaks.
2013-12-05 16:53:43 -08:00
Paul O’Shannessy 2ebbbc5145 Followup fix for lint 2013-12-05 15:55:49 -08:00
Ben Alpert d0883c8cc7 Use depth (not owner) to check for root components
Fixes #557.
2013-12-05 13:36:29 -08:00
Andreas Svensson 27b8e7a6f4 corrections 2013-12-05 19:40:48 +01:00
Andreas Svensson 4d6d4b54d6 Fix ReactDOMTextarea missing "rows" and "cols" attribute, incorrect "size" property 2013-12-05 18:36:48 +01:00
Andreas Svensson e060eabb01 Add HAS_POSITIVE_NUMERIC_VALUE to DOMProperty and normalize behavior of null values
Uniformly remove null values, rather than sometimes set/remove, could potentially assign 'null' or 'undefined'
2013-12-05 18:36:46 +01:00
Marshall RochandPaul O’Shannessy d17bd176a2 Remove support for putting mixins, propTypes, etc. in 'statics'
This leaves statics as a way to define static methods and properties
that will be accessible on the return value of `React.createClass`
without changing the current spec.
2013-12-04 20:27:44 -08:00
Sean KinseyandPaul O’Shannessy c2e48740fc [ReactTransitionGroup] Add onTransitionEnter and onTransitionLeave
It is valuable to know when the number of children in a TransitionGroup is going
to increase or decrease, since we might want to apply extra animations.
For instance, when used with overflow:auto, we might want to apply different css
based on it overflowing or not - to do this we need to calculate this after new
nodes has entered and after nodes has been removed.
2013-12-04 20:27:28 -08:00
John WatsonandPaul O’Shannessy bf24dc33f7 Separate replaceState invariant violations
It'd be nice if we knew which error we were hitting when this invariant hit.
2013-12-04 20:27:24 -08:00
Marshall RochandPaul O’Shannessy e3ad088ff3 Remove deprecation warning for React statics 2013-12-04 20:27:19 -08:00
Paul O'ShannessyandPaul O’Shannessy 1b8bdbe177 Remove deprecated React.unmountAndReleaseReactRootNode 2013-12-04 20:27:15 -08:00
Marshall RochandPaul O’Shannessy 79b9d5af62 Introduce 'statics' for class specification
This moves the static properties off of the root object and into
a 'statics' property. Then they are made available on the constructor so
they can be used directly and in mixins.
2013-12-04 18:39:44 -08:00
Ben Newman affe7f98b5 Merge pull request #367 from benjamn/findComponentRoot-memory-usage-improvements
Space optimizations for ReactMount.findComponentRoot.
2013-12-04 13:20:29 -08:00
Ben Alpert 9d443542f9 Remove unused updatePropertiesByID 2013-12-03 19:22:36 -08:00
Ben Newman 87db648f3e Address pull request feedback. 2013-12-03 16:43:37 -05:00
Ben Newman 6b9fc81b64 Space optimizations for ReactMount.findComponentRoot. 2013-12-03 16:43:37 -05:00
Paul O’Shannessy 9d18956b09 Merge pull request #624 from spicyj/remove-registrationNamesKeys
Remove unused event plugin registrationNamesKeys
2013-12-02 16:03:36 -08:00
Pete HuntandPaul O’Shannessy 3851462b80 Fix lint warnings 2013-12-02 13:32:09 -08:00
Paul O’Shannessy 76e3294c8f Merge pull request #609 from subtleGradient/subtlegradient/fixes-ios-crasher
fixes iOS crasher
2013-12-02 13:25:40 -08:00
Paul O’Shannessy d64256fb65 Merge pull request #626 from spicyj/getUnboundedScrollPosition-license
Add missing license header
2013-12-02 09:07:07 -08:00
Ben Alpert 1cb402c410 Add missing license header 2013-12-02 01:12:20 -08:00
Ben Alpert 4323ab095f Remove unused event plugin registrationNamesKeys 2013-12-01 22:28:19 -08:00
Pete Hunt 92b62bf1fe Merge pull request #576 from spicyj/immutable-props
Don't mutate passed-in props
2013-12-01 18:26:41 -08:00
Pete Hunt 2a84b6c6b2 Merge pull request #537 from hojberg/dont_animate_undefined_children
ReactTransitions: Don't animate undefined children
2013-12-01 14:21:11 -08:00
Paul O’Shannessy 8fbdb50a9d Merge pull request #597 from spicyj/gh-527
Don't use .returnValue if .defaultPrevented exists
2013-11-27 14:28:26 -08:00
Paul O’Shannessy 5fbd8109f8 Merge pull request #598 from spicyj/gh-516
Be resilient to fn.name not existing in IE
2013-11-27 14:28:02 -08:00
Thomas Aylott 916ee6b394 jsx & JSDOM support 2013-11-27 17:04:40 -05:00
Marshall RochandPaul O’Shannessy 697a9113c0 ReactPropTypes: add oneOfType to support union types
Summary:
e.g.

  propTypes: {
    foo: React.PropTypes.oneOfType([
      React.PropTypes.string,
      React.PropTypes.number
    ]);
  }

to do this, I exposed a `.weak` chainable validator that returns instead of throws, e.g.

  React.PropTypes.string.isRequired.weak
  React.PropTypes.string.weak

which returns true or false. Technically, `React.PropTypes.string.weak.isRequired` also exists, but `oneOfType` will never call it. Might be useful to people creating custom validators though.
2013-11-27 12:10:50 -08:00
Marshall RochandPaul O’Shannessy 351dcfed01 Validate propTypes, contextTypes, childContextTypes
who watches the watchmen?
2013-11-27 12:10:50 -08:00