-
Notifications
You must be signed in to change notification settings - Fork 266
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Editing Cells #20
Comments
Can you show me your code? |
Sure. I was trying to get a feel for things by following the example code in the repo. Main body looks as follows: <body>
...
<div id="portal" />
</body I have set the columns as follows: const columns: GridColumn[] = [
{ title: 'Number', width: 100 },
{ title: 'Square', width: 100 },
] defined the data editor container: <DataEditorContainer width={500} height={300}>
<DataEditor
getCellContent={getData}
columns={columns}
rows={1000}
/>
</DataEditorContainer> and the function getData([col, row]: readonly [
number,
number
]): EditableGridCell {
let n: number
if (col === 0) {
n = row
} else if (col === 1) {
n = row * row
} else {
throw new Error('This should not happen')
}
return {
kind: GridCellKind.Number,
data: n,
displayData: n.toString(),
allowOverlay: false,
}
} I am able to select cells fine, but the |
Oh okay yes, sorry I thought your question was something else. Set |
Great thank you for the clarification. Should the overlay be placed directly over the cell being edited by default? I am seeing behavior where it opens a few cells above such as in #17 (but on desktop). I do not see this behavior on desktop when using the demo. |
Can you check and make sure your portal is positioned at 0,0? Maybe the portal is somehow being offset? |
Also just a working example I could look at would be very helpful |
After following the initial setup steps under the
HTML/CSS Prerequisites
and the code from theusing
section of the README, I am not able to enter the editing mode by clicking on a cell. In the DOM the portal element is not changing.Is there something that I need to enable in order to allow for the editing UI when clicking on a cell? I am using an
EditableGridCell
. If I setallowOverlay
to true I do get an editable box which appears to work as expected.The text was updated successfully, but these errors were encountered: