Comments (5)
Very strange. This does not seem to be the case with the demo. Can you demonstrate the bug?
from react-calendar-timeline.
Same problem here. Works only once per page refresh.
Has this been resolved in some way?
from react-calendar-timeline.
Has anyone managed to fix this yet? I have the same problem and I can't find a solution.
from react-calendar-timeline.
I figured a solution, but don't know why. If you install:
npm install --save-dev babel-plugin-transform-class-properties
and update the webpack to something like:
{
test: /\.js$/,
loader: 'babel-loader',
exclude: /node_modules/,
query: {
presets: ['react', 'es2015'],
plugins: ['transform-class-properties']
}
}
it runs correctly.
Edit: this is due to the arrow notation that is being used.
from react-calendar-timeline.
@jlubben thank you for finding this! :)
We do use class properties in the code for this module, mainly the bound functions like this:
class Timeline extends Component {
boundFunction = () => {
return this.instanceProperty;
}
}
When the library is built, all of the code is converted (transpiled) to regular ES5 via babel and can be imported anywhere without complications.
However if you use a build tool that supports module
(previously jsnext:main
) in package.json
, your build tool will instead take the untranspiled code. Rollup and Webpack 2+ both do this.
If then your babel configuration is not set up like the library's, you may run into problems.
I personally use these presets:
{
"presets": ["es2015", "stage-0", "react"],
}
Adding stage-0
(babel-preset-stage-0
) automatically adds transform-class-properties
and some other useful features. If that seems a bit too experimental for you, then just stage-2
is enough.
I added a note for this into the README
Closing the issue now. Feel free to reopen in case of problems!
from react-calendar-timeline.
Related Issues (20)
- Adding a new item already selected and resizable
- Is there any way we can make first row sticky along with header ? HOT 1
- Issue with getSumScroll Function while dragging the item using drag handle or by moving the item
- groupRenderer does not work correctly HOT 1
- Feature Request: Allow the user to replace the timeline header with a number range HOT 1
- Provide a week view to the DateHeader component with unit="primaryHeader".
- Dragging item scrolls the timeline
- Legacy context API has been detected within a strict-mode tree HOT 2
- Customizing main header - Is it possible to render day index instead of dates? HOT 1
- Can we have an array of Tittles in Items HOT 1
- Need a way to make a calendar item the full height of the row HOT 3
- Remove usage of moment library entirely HOT 2
- how can i provide minimun fixedwidth for date so that i can mention another values with date also like count for that date etc HOT 1
- Stacking only enforced when times overlap
- i want to keep unit zoom level
- Scroll Bug HOT 3
- Selecting different cells in parallel
- Drag and drop items between different timelines
- Style horizontal line per hour ?
- Lack of Touch Event Handling in onCanvasContextMenu
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-calendar-timeline.