-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DataGrid] Cell clipboard paste, leading "v" (#9205)
Co-authored-by: Olivier Tassinari <[email protected]> Co-authored-by: Andrew Cherniavskyi <[email protected]>
- Loading branch information
1 parent
316fa94
commit f908aec
Showing
11 changed files
with
128 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import * as React from 'react'; | ||
import { DataGrid } from '@mui/x-data-grid'; | ||
|
||
const baselineProps = { | ||
rows: [{ id: 0, age: 40 }], | ||
columns: [{ field: 'age', type: 'number', editable: true }], | ||
}; | ||
|
||
export default function KeyboardEditNumber() { | ||
const [updates, setUpdates] = React.useState<number[]>([]); | ||
return ( | ||
<div> | ||
<div style={{ width: 300, height: 300 }}> | ||
<DataGrid | ||
{...baselineProps} | ||
processRowUpdate={(newRow) => { | ||
setUpdates((prev) => [...prev, newRow.age]); | ||
return newRow; | ||
}} | ||
/> | ||
</div> | ||
<div> | ||
{updates.map((update, key) => { | ||
return ( | ||
<div key={key} data-testid="new-value"> | ||
{typeof update} {update} | ||
</div> | ||
); | ||
})} | ||
</div> | ||
</div> | ||
); | ||
} |
Oops, something went wrong.