216 Commits

Author SHA1 Message Date
Dan Holmsand
5bbba3e30a Make sure inputs don't lose focus
selectionStart/End should not be set on inputs that don't have focus
currently.
2015-08-19 10:50:53 +02:00
Dan Holmsand
6548e7ef76 Merge branch 'master' of https://github.com/holmsand/reagent 2015-08-19 10:17:17 +02:00
Walton Hoops
38a726e4b1 Merge pull request #126 from Day8/patch-79
Position cursor after an input's value has changed
2015-08-18 16:48:04 -06:00
Dan Holmsand
51048c7a7f Avoid unnecessary warning about missing :key
:key is not necessary in seqs in render-to-string et al.
2015-07-31 16:18:51 +02:00
Dan Holmsand
4cd8ab6dff Make extended hiccup syntax much faster
by taxing GC less
2015-07-31 08:20:18 +02:00
Dan Holmsand
f00ca03f70 Merge https://github.com/holmsand/reagent 2015-07-30 19:25:08 +02:00
Dan Holmsand
5e8b813963 Fix -swap! in ratom.cljs 2015-07-30 19:19:07 +02:00
Howard M. Lewis Ship
4d32b97ca6 Correct error in example in docstring 2015-06-25 11:44:09 -07:00
Howard M. Lewis Ship
4160fdfd35 Fix typo in docstring 2015-06-25 11:43:49 -07:00
Howard M. Lewis Ship
072043dba1 Use when rather than if
In this situation, only a keyword should be split on '>'; the other possibilities (string, symbol, native element) are not subject
to splitting into nested tags.
2015-06-25 11:42:18 -07:00
Howard M. Lewis Ship
3d6c2f5e3f Implement nested Hiccup elements 2015-06-18 18:05:21 -07:00
Dmitri Sotnikov
32f1d9395d Merge pull request #128 from Hardikus/rest-destructuring
Fix destructuring for variable arity
2015-06-16 14:45:51 -04:00
Dan Holmsand
2d6e74d477 Use :require-macros throughout 2015-05-31 11:57:16 +02:00
Dan Holmsand
569322949b Take advantage of new figwheel 2015-05-31 11:51:11 +02:00
Dan Holmsand
05bb63f254 Update React to 0.13.3-0, and more
Newer ClojureScript, figwheel, Clojure, cljsbuild
2015-05-29 10:50:23 +02:00
Dan Holmsand
cdd3c851a0 Fix cursor bug
Cursor wasn't updated when changing both the cursor and an
underlying atom at once.
2015-05-25 21:31:43 +02:00
Hardik Bhadani
ecc7a9c4c3 Fix destructuring for variable arity 2015-05-14 00:25:28 +05:30
mike-thompson-day8
6319a968ac Remove "number" and "email" from the list of input types supporting selection API 2015-05-12 09:04:22 +10:00
mike-thompson-day8
985641d847 Make cursor position work for <textarea>s
It turns out that the type attribute of a <textarea> is always "textarea"
http://www.w3.org/TR/2012/WD-html5-20121025/the-textarea-element.html#dom-textarea-type
2015-05-11 17:30:00 +10:00
mike-thompson-day8
90949431f5 Fix #79 - position cursor after resetting an input's value 2015-05-08 11:53:55 +10:00
Martin Klepsch
1711a291c1 require reagent.ratom macros in cljs namespace 2015-03-20 22:28:04 +01:00
Dan Holmsand
6009908d5d Add some docs for force-update-all 2015-03-11 17:51:54 +01:00
Dan Holmsand
19a384443f Make -deref in Reaction a little clearer 2015-02-11 06:47:11 +01:00
Dan Holmsand
526dfa61ea Make swap! on non-active Reaction correct 2015-02-11 06:38:57 +01:00
Dan Holmsand
8feaccca88 Add IReactiveAtom type, and use in cursor asserts 2015-02-09 13:19:12 +01:00
Dan Holmsand
a29e0c75c7 Make sure reactify-component always re-renders
It might get mutable data from js
2015-02-08 13:20:40 +01:00
Dan Holmsand
e6c8639277 Try harder to find meaningful name for components
Thereby hopefully improving warning messages a bit.
2015-02-08 12:56:56 +01:00
Dan Holmsand
a2b5acb68f Make warning for missing keys print data
That will hopefully make finding the offending code easier
to find.
2015-02-08 12:24:52 +01:00
Dan Holmsand
8b5905c9e1 Add reactify-component: adapts Reagent component for use in JSX 2015-02-08 00:04:45 +01:00
Dan Holmsand
b574d8cc5a Add state-atom (again) 2015-02-07 09:39:33 +01:00
Dan Holmsand
ac3ed8dbe0 Mention :reagent-render in docs, and use it in template.cljs 2015-02-04 22:55:55 +01:00
Dan Holmsand
721e3bab00 Revert adding of state-atom
There may be a better api - and it's not very important anyway.
2015-02-04 22:50:22 +01:00
Dan Holmsand
017fa9c106 Rename :component-function to :reagent-render
But keep :component-function as alias for the time being
2015-02-04 22:45:39 +01:00
Dan Holmsand
c862792624 Revert experiment with lazy reaction
Needs more surgery to get this to work properly
2015-02-04 22:14:04 +01:00
Dan Holmsand
d39656624d Make Reaction and cursors lazy
Their value will now only be calculated as needed (i.e when deref
is called), which should make debugging them much easier.

This also makes updating the atom they are relying on cheaper.
2015-02-04 16:03:35 +01:00
Dan Holmsand
9260d9b74b More docs for cursor 2015-02-02 22:14:57 +01:00
Dan Holmsand
600d6bbb59 Add some docs for adapt-react-class 2015-02-02 17:47:01 +01:00
Dan Holmsand
15acc0d6ff Added adapt-react-class 2015-02-02 15:19:43 +01:00
Dan Holmsand
7df2941c7d Better error reporting
Warnings are now printed using console.warn. The name of the current
component is included in more cases.

Also warn every time an atom is derefed in a lazy seq, and not just
the first.
2015-02-02 13:41:29 +01:00
Dan Holmsand
5eca79a433 Try warn when passing native React classes to hiccup form 2015-02-01 21:43:41 +01:00
Dan Holmsand
f005fe3d1e Expose state-atom 2015-02-01 21:13:05 +01:00
Dan Holmsand
81dfa7c682 Allow auto-running reaction to be watched 2015-02-01 20:26:18 +01:00
Dan Holmsand
2c7abcb710 Add warning when derefing a changed wrap 2015-02-01 19:53:00 +01:00
Dan Holmsand
6e0e9ed564 Make wrap watchable 2015-02-01 19:43:26 +01:00
Dan Holmsand
5798a3f056 Move wrap to ratom 2015-02-01 19:22:46 +01:00
Dan Holmsand
742a8d3575 Add some preliminary docs 2015-02-01 15:29:04 +01:00
Dan Holmsand
83fd1361df Remove bundled React
No longer needed, since we use cljsjs/react instead.

Also remove obsolete interop macros, and some general cleanup
2015-02-01 15:13:08 +01:00
Dan Holmsand
58fd72cd86 Make sure setter can override values in Reaction
Also assert that cursor src isn't a vector.

And a little cleanup.
2015-02-01 12:53:44 +01:00
Dan Holmsand
744165737f Make Reaction always call watches
Even if it is not executed automatically
2015-02-01 00:41:59 +01:00
Dan Holmsand
6d9bb35996 Deprecate calling cursor with atom as second argument 2015-01-31 14:29:01 +01:00