-
Notifications
You must be signed in to change notification settings - Fork 10
fix(grid): removed old generated sample and changed name of the corre… #831
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
base: vnext
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This handler isn't attached anywhere. It can be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be bound via the grid's template using the ActiveNodeChangeScript
property.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added to onkeydown
|
||
var shouldAppendValue = false; | ||
|
||
window.attachKeyDownEvent = () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to go through the rendered event to bind the rest of the handlers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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? |
…xamples into ttonev/fix-622-blazor
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