Closed ahoereth closed 8 years ago
@@ master #369 diff @@
==========================================
Files 107 107
Lines 2107 2116 +9
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
Hits 2093 2093
- Misses 14 23 +9
Partials 0 0
Powered by Codecov. Last update 191a863...45699c2
If the user pass an immutable-js list instead of a plain array, and we're using array functions on it, how will it work on the immutable-js structure? Does it has the same functions?
Like, .lenth()
, .slice()
, .map
, etc?
There is no length property, slice()
, map()
etc work the same. For all the available functions see the sidebar in the immutablejs docs -- they mostly correspond to their JS/ES6 equivalents, especially to the new ES6 Map type.
...and I just figured: This makes a lot more changes necessary. Seems like the code just seemingly works fine as is, but actually does not. Will need to add immutablejs as dev dependency to test this thoroughly.
I won't have time to complete this PR in a timely manner, using a simplified custom DataTable for now. Closing this for now, hope to come back to it later.
See issue #359.
Uses react's getIteratorFn() to check weather the passed prop can be iterated. Currently I do not check for valid child items.. Not sure whether that's required? Would cause quite a bit of overhead.
Side note: Does this make sense for any other react-mdl component? Did not find anything where immutable (or similar) props make sense.