Comments (8)
A minimal sandbox will help for sure. Good luck for your investigation 👍
from material-react-table.
Looks like others have run into this as well. React DnD hijacks all dragging events by default. Looks like they have a solution here?
from material-react-table.
Maked my codesandbox worked but not my real app use case, don't know why... Already spent too much time on this, I went for react-beautiful-dnd and it works like a charm 👍
from material-react-table.
Closing, as this is an issue caused by another library, with working workarounds available
from material-react-table.
@PeretEtienne its been a while but wanted a clarification on your last statement,
Did you use react-beautiful-dnd instead of react-dnd in that other part of the project so it would not break the material react table row dnd native functionality or did you use react-beautiful-dnd for the material react table itself?
Currently I'm having the same issue as you did but I'm using @hello-pangea/dnd a fork of react-beautifull-dnd that supports react18 and the material react table row native dnd functionality is not working even when following the examples in the documentation to the T including with my case of having row-ordering with row-selection:
material-react-table.dev/?path=/story/features-row-ordering-examples--row-ordering-with-select
its very odd in my case since I'm sure react-beautifull-dnd api does not overlap with the native HTML dnd api and it seems like thats what material react table is using
from material-react-table.
Hi ! I switched from react-dnd to react-beautiful-dnd for the container of my tables. I did not replaced the lib used by material-react-table itself.
It looks something like this now :
import { DragDropContext, Droppable, Draggable } from 'react-beautiful-dnd';
import { Box } from '@mui/material';
const Component = () => {
const renderCard = ([blockName, block], index) => {
return (
<Draggable key={blockName} draggableId={blockName} index={index}>
{(provided, snapshot) => (
<ReportCard
id={blockName}
block={block}
provided={provided}
snapshot={snapshot}
/>
)}
</Draggable>
);
};
// ...
return (
<DragDropContext onDragEnd={onDragEnd}>
<Droppable droppableId="droppable">
{(provided) => (
<Box ref={provided.innerRef} {...provided.droppableProps}>
{reportBlocksEntries.map(renderCard)}
{provided.placeholder}
</Box>
)}
</Droppable>
</DragDropContext>
);
};
Tables are in ReportCard and work correctly
from material-react-table.
@PeretEtienne thanks for the speedy reply!
I guess I have to investigate more on why its not working as intended, for now when I try to drag it gives me the "not-allowed" cursor and the row is stuck in its place with the faint transparent striped border.
my plan now is to do a mini project to isolate this feature and see what happens.
from material-react-table.
@KevinVandy I found the issue and its because I'm running my application in Tauri not sure why but its not working in the desktop application port but when I run it on the browser the functionality works without any issues
CC: @KevinVandy any Idea why Tauri is clashing with the dnd api?
edit:
Apparently its a known issue in tauri:
tauri-apps/tauri#2014
from material-react-table.
Related Issues (20)
- Custom filter popover text
- Header Group visibility is always true
- Pinning hidden columns with column virtualization causes error
- Show / hide all buttons don't update header group visibility state
- When using `enableRowVirtualization`, the layout of `filterVariant: 'datetime-range',` behaves improperly
- [UX] Pinning columns to the right pushes item to the bottom of menu
- Table Footer gets cut off in narrow scenarios
- Really strange issue HOT 7
- Localisation of filters does not apply to the filter menu HOT 1
- Show/hide filter triggers onColumnFiltersChange for backend pagination HOT 4
- "Show filter" triggers onColumnFiltersChange for backend pagination
- Mantine Filter Search Does Not Work Correctly and Highlight Words When Turkish Characters Are Used with Capslock On. HOT 2
- Virtualization is not working properly even on the documentation page! HOT 5
- Sticky Pinned Columns Misplacement in Material React Table for RTL Language
- MRT_TablePaper zIndex is lower than Appbar in Fullscreen
- Pinned columns collapsing even with layoutMode: 'grid-no-grow'
- Drag row exception when row virtualization is true HOT 1
- Header title has been dissapear from v10 to v11 HOT 1
- Pagination Container Box gets cut off when default font size is not 16px HOT 1
- [BUG] - Sub Row Selection not working correctly
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 material-react-table.