react-lazylog
react-lazylog copied to clipboard
3.1.x - es5 problem
After update lazy-logger to version 3.1.1 (from 2.x) the problem Uncaught TypeError: e is not a function still exist.
For 2.x import { LazyLog } from 'react-lazylog/lib/LazyLog.es5'; worked but for 3.1.1 import {LazyStream, ScrollFollow} from 'react-lazylog/es5'; generating error.
@dmarczydlo do you have a reduced repo I can try this out on?
Hm... you can use https://github.com/dmarczydlo/docker-logger/tree/greenkeeper/react-lazylog-3.1.3 (branch created by greenkeeper) but before compile you have to update /components/docker/docker.jsx from import {LazyStream, ScrollFollow} from 'react-lazylog/lib/LazyLog.es5'; to syntax from last version
@dmarczydlo there are a few other changes in the API which should be documented in the props. I tried out your repo and updated it to this and didn't see any of those ES5 errors, could you try it too?
import {LazyLog, ScrollFollow} from 'react-lazylog/es5';
// ...
<ScrollFollow startFollowing render={({follow, onScroll}) => (
<LazyLog url={URL} follow={follow} onScroll={onScroll} />
)} />
Yes but you used LazyLog instead of LazyStream. How can I use LazyLog for stream GET?
And another question can I modify somehow featchOptions to send POST request?
There is no longer a LazyStream, you can pass a stream prop to LazyLog:
<LazyLog stream url={URL} follow={follow} onScroll={onScroll} />
To modify fetchOptions, you should be able to specify the method:
<LazyLog
fetchOptions={{ method: 'POST' }}
Let me know how that goes!
I'm not sure that LazyLog working correct.
Look at image below

New rows overrides old. It looks that when some rows are to longer.
LazyLog looks like TextArea also. Can I change it to selecting row (like LazyStream worked - with colors)?
(Preview expected for me version)

Also last row is still hidden.
fetchOptions={{ method: 'POST' }} // working correct :)
Wow, that looks really odd, almost like the style isn't being applied. Can you update to the latest version and see if that fixes anything?
Hm... As I think I using the latest version
"react-lazylog": "^3.1.3",
So I think that this issue existing in last version.
I see the same issue with the latest version.
If you could produce a reduced test repo, that would be really helpful.
@eliperelman - as I saw you updated project to 2.2.0 version. What does it mean ? Did you reverse some features/props?
I want to update lazylog to last fine version but I'm confused which version is correct.
@dmarczydlo apologies, I published #14 but didn't mean for it to be tagged as latest. I have re-tagged 3.1.3 as latest.
So 3.1.3 should be latest also should work correctly? I mean suggested problem in here
Right, I just don't have any repo to replicate against in order to fix it.
Ok I will check this version on weekend. If this problem will still existing I'll try to create repo for you.
@eliperelman Sorry it took me much longer than I expected to have time to put together an example repo.
Here you go: https://github.com/stephenwilliams/react-lazylog-issue-11
@eliperelman quick update:
v3.1.3 working correct (but only react-lazylog unfortunately react-lazylog/es5 looks like above - white page without missing styles but I using normal version)
Also last line problem still existing for v3.1.3
OK, taking a look now.
@dmarczydlo @stephenwilliams I didn't think you would need to do this, but could you manually import the CSS?
import 'react-lazylog/es5/index.css';
@stephenwilliams index.css not existing in 3.1.3
I just pushed a patch version, could you try it again?
where is this patch? What branch? Did you push to npm or only to github somewhere?
Sorry, it's the latest on npm, 3.1.4.
Hm.. ok this version have index.css. I'm not sure that I understood you but if want to test solution as import index.css manually - this approach not fix last line issue for me.
react-lazylog is implemented in https://github.com/dmarczydlo/docker-logger/ master branch was updated to last version 3.1.3 few minutes ago.
Yeah, the last line thing is not in the 3.x branch yet, but wanted to make sure the styling was showing up.
@eliperelman Updating to 3.1.4 and adding import 'react-lazylog/es5/index.css'; fixed it for me
Thanks again for your work on this library!
@eliperelman do you working on last line issue?