You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[ ] bug report => search github for a similar issue or PR before submitting
[ x] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/ceolter/ag-grid/blob/master/CONTRIBUTING.md#question
Current behavior
A similar feature request to this has already been raised #921.
However, the proposed solution (using event.stopPropagation) doesn't work with the react version of the ag grid. This is because react implements a global event handler and dispatches synthetic events to its components. facebook/react#8693
Since ag grid is not a react component and isn't driven by react events, I cannot stop propagation within a react event handler; I have to implement a dom event handler and stop propagation within it. This stops the event from reaching any react components, regardless of weather they are children or parents of the component which stops the propagation.
Expected behavior
Ideally, it should be possible to turn off navigation keys for editors through a flag on the column definition.
I understand that this solution is extremely coupled to the problem. However, given the way react works and the fact that ag grid is not driven through react events, I can't see another solution. I'll be implementing this in a fork, so if you want I can submit a PR.
Stopping dom event propogation in TestEditor doesn't block the dom event in TestEditorSubComponent, but it blocks the react event from reaching that same component. Therefore there is no way for me to stop navigation keydown events from reaching Ag Grid while at the same time handling those same events within my component. Doing everything through dom events is not an option, as I can't use third party react components in that case.
ag-Grid version: 8.2.0
ag-Grid-React version: 8.2.0
Browser:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36
Language: [TypeScript 2.2.1 | ES7 ]
The text was updated successfully, but these errors were encountered:
I'm submitting a ... (check one with "x")
Current behavior
A similar feature request to this has already been raised #921.
However, the proposed solution (using event.stopPropagation) doesn't work with the react version of the ag grid. This is because react implements a global event handler and dispatches synthetic events to its components. facebook/react#8693
Since ag grid is not a react component and isn't driven by react events, I cannot stop propagation within a react event handler; I have to implement a dom event handler and stop propagation within it. This stops the event from reaching any react components, regardless of weather they are children or parents of the component which stops the propagation.
Expected behavior
Ideally, it should be possible to turn off navigation keys for editors through a flag on the column definition.
I understand that this solution is extremely coupled to the problem. However, given the way react works and the fact that ag grid is not driven through react events, I can't see another solution. I'll be implementing this in a fork, so if you want I can submit a PR.
Minimal reproduction of the problem with instructions
This plunkr shows an example of the issue http://plnkr.co/edit/Cdz9yqI7k9qgoGQc2u2a?p=preview
Stopping dom event propogation in TestEditor doesn't block the dom event in TestEditorSubComponent, but it blocks the react event from reaching that same component. Therefore there is no way for me to stop navigation keydown events from reaching Ag Grid while at the same time handling those same events within my component. Doing everything through dom events is not an option, as I can't use third party react components in that case.
ag-Grid version: 8.2.0
ag-Grid-React version: 8.2.0
Browser:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36
Language: [TypeScript 2.2.1 | ES7 ]
The text was updated successfully, but these errors were encountered: