Drag and Drop : Custom props in custom component does not work
See original GitHub issueDo you want to request a feature or report a bug?
BUG
What’s the current behavior?
- Using
<DragAndDropCalendar/>
component and adding a custom toolbar incomponents
prop - Passing some custom props to custom toolbar component
Eg. In below sandbox passing
switchView
prop - Only initial value is passed
- Updated value on re-render is not passed
NOTE: this behaviour is noticed in functional implementation using hooks in classical component this things works well
For bugs, please include the following if possible:
-Browser - Google Chrome -OS - MacOS -react-big-calendar - 0.26.1 -codesandbox : https://codesandbox.io/s/react-big-calendar-6oq3f
What’s the expected behavior?
- The updated value of props should be passed
Issue Analytics
- State:
- Created 3 years ago
- Comments:6
Top Results From Across the Web
react-draggable not working with custom components
You have to give your component a rest prop. You need to do this because DraggableCore copies the component and puts several event...
Read more >How to implement drag and drop in React with React DnD
The component is straightforward, but let's take a closer look at the code. useDropzone exposes several methods and variables for us to create ......
Read more >How to Add Drag and Drop in React with React Beautiful DnD
We'll be using the Draggable component, which again, similar to the Droppable component, will include a function where we'll pass through props ......
Read more >FAQ - React DnD
How do I make the component draggable only by a small handle? ... Specify the container node as the dragPreview , but only...
Read more >The List Component - React-admin - Marmelab
For example, you can hide the <CreateButton> when the user doesn't have the right ... You can use the empty prop to replace...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
So I kinda fixed it by making a wrapper class component and passing the props over to the actual Calendar like this.
@JesseyStend @alisakova Any update on this the custom toolbar is not working with drag and drop on react-big-calender ??