Comments (6)
@cherniavskii Thank you. This will satisfy the current use case and it would be great if this feature can be included in v6
from mui-x.
Hi @silvialeung-mh
I've opened a PR for it #12225
You can check out the demo here: https://deploy-preview-12225--material-ui-x.netlify.app/x/react-data-grid/clipboard/#events
Is this what you're looking for?
Also, do you need this for the v6 of the data grid?
from mui-x.
Ah, yes ... I am sorry. I did not check that beforehand. Sry! 🙇🏼
As it stands the problem is that the onClipboardPasteStart
method can only be used to implement side-effects, which is not what I would expect from an event-handler.
I would propose a solution for this to prevent execution based on the return value of onClipboardPasteStart
, or even make the method a Promise that will only execute the paste on resolve()
and otherwise abort, but it is a breaking change.
WDYT @MBilalShafi @cherniavskii ?
from mui-x.
Hey @silvialeung-mh ... yes, you can achieve something like this if you prevent execution of processRowUpdate
with a combination of await
, Promise
and events. I did play around with this a bit and this is what I came up with: Paste operation Dialog
This example is pretty basic, so you might want to extend it a bit and tailor it to your specific implementation! Let me know if this helps you! Thanks! 🙇🏼
from mui-x.
Hi @michelengelen , thanks for the quick response. I played around with the sandbox you have provided but it seems to have affected normal edit as it is now waiting for 'dialog-action' event and I am not sure where to dispatch it in normal edit flow (because onCellEditStop runs before processRowUpdate).
from mui-x.
If you have a similar problem, please open a new issue and provide details about your specific problem.
If you can provide additional information related to this topic that could help future readers, please feel free to leave a comment.
How did we do @silvialeung-mh?
Your experience with our support team matters to us. If you have a moment, please share your thoughts through our brief survey.
from mui-x.
Related Issues (20)
- [DateTimeRangePicker] Different selection flow option HOT 2
- [data grid] Clipboard copy places unnecessary quotations when copied text contains a quotation HOT 4
- DesktopDatePickerProps<Date> error Type 'Date' does not satisfy the constraint 'never' in version 7.1.0 HOT 10
- [data grid] Export to Excel causes rows to be misaligned from their headers (with checkboxes present) HOT 3
- [data grid] rendering complex components in a cell push pieces to following rows HOT 3
- [data grid] Support the custom header filter height that is independent from the column header height HOT 8
- [fields] Can not type into date picker after dismissing calendar picker HOT 3
- [TreeView] Improve keyboard navigation based on the ARIA spec
- The GridValueFormatterParams interface has NOT been removed in v7 HOT 1
- [DataGrid] Server-side filter demo not working HOT 1
- [DatePicker] DatePicker dayjs date format not working v7.0.0 HOT 1
- [data grid] Module '"@mui/x-data-grid-premium"' has no exported member 'GridColDef'. HOT 3
- [pickers] Allow to customize the size / density of the views HOT 5
- [fields][DateField] fails to accept '22' as day keybord input in FR locale with format Do MMM YYYY HOT 2
- [question] After updating data grid to version 7, cells do not handle overflow and render ellipsis by default HOT 8
- [data grid] Nested grouping and sort by aggregation does not sort the second level HOT 6
- [charts] Rendering a Bar Chart with an empty dataset throws an error HOT 3
- [pickers] V7 LocalizationProvider not accepting AdapterMoment HOT 5
- [charts] Add Maps support
- Move internal localization hooks `useUtils`, especially `useLocaleText`, to Public API HOT 1
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 mui-x.