fix(grid): removed old generated sample and changed name of the corre…#831
fix(grid): removed old generated sample and changed name of the corre…#831
Conversation
|
@tishko0 can you please resolve the conflict |
1 similar comment
|
@tishko0 can you please resolve the conflict |
| @@ -1,35 +1,79 @@ | |||
| igRegisterScript("WebGridEditingExcelStyle", (ev) => { | |||
There was a problem hiding this comment.
This handler isn't attached anywhere. It can be removed.
| if ((key >= 48 && key <= 57) || (key >= 65 && key <= 90) || (key >= 97 && key <= 122)) { | ||
| var columnName = grid.getColumnByVisibleIndex(activeElem.column).field; | ||
| var cell = grid.getCellByColumn(activeElem.row, columnName); | ||
| grid1.addEventListener('activeNodeChange', (event) => { |
There was a problem hiding this comment.
This can be bound via the grid's template using the ActiveNodeChangeScript property.
There was a problem hiding this comment.
adding it with the property does not register the event, and it is not working. Not adding it for now. Needs further investigation
There was a problem hiding this comment.
@tishko0 Works just fine on my side if the handler is registered correctly:
igRegisterScript("onActiveNodeChange", (ev) => {
const grid = ev.target;
grid.endEdit();
(grid.getElementsByClassName("igx-grid__tbody-content")[0]).focus();
}, false);
And the property is set to match the name:
ActiveNodeChangeScript="onActiveNodeChange"
I see no issue with the property.
There was a problem hiding this comment.
I have no idea what is wrong with this, tried it now and it hits the breakpoint inside while it did not back then. Added it and resolved conflicts, should be all good now.
| if (cell && !grid.crudService.cellInEditMode) { | ||
| grid.crudService.enterEditMode(cell); | ||
| cell.editValue = key; | ||
| grid1.addEventListener('keydown', (e) => { |
There was a problem hiding this comment.
This can be bound via the generic keydown event:
@onkeydown="OnKeydown"
async private void OnKeydown(KeyboardEventArgs e)
{
await JS.InvokeVoidAsync("keydownHandler", new object[] {e});
}
The content of the handler can be the same.
|
|
||
| var shouldAppendValue = false; | ||
|
|
||
| window.attachKeyDownEvent = () => { |
There was a problem hiding this comment.
No need to go through the rendered event to bind the rest of the handlers.
There was a problem hiding this comment.
keeping it for now to register the activeNodeChange event only once, as before it was registering in the keydownhandler which was unnecessary. Once the issue with ActiveNodeChangedScript is resolved this can be removed
|
@tishko0 I see no commits after the comments, please address them. |
|
@tishko0 please resolve conflicts |
|
only conflicts i fixed were updates on deleted files from my branch. Now after the merge the grid is loosing focus. I will keep looking at this trying to find what is breaking this with the new version |
|
@tishko0 can you please resolve the conflicts? |
29d411b to
8db7123
Compare
fixes #622
Removed old generated sample from xplat and fixed name so the correct custom sample is displayed on the cell editing page of IgrGrid