Hi
I’m facing an issue using the Syncfusion examples of the GridComponent of
React, if added more columns to the table, the horizontal the scrolling appears,
which is fine the problem is after scrolling the table to the right, when I try
to edit a column the focus comes back to the initial position of the table.
Do you have any suggestions to fix this behaviour?
[index.js]
export class NormalEdit extends SampleBase {
constructor() {
. . . .
this.focusIndex = null;
}
actionBegin(args) {
if (args.requestType == "beginEdit") {
this.focusIndex = document.activeElement.cellIndex;
}
. . . .
}
actionComplete(args) {
if (args.requestType == "beginEdit") {
args.row.querySelector('#' + this.gridInstance.element.id + this.gridInstance.columns[this.focusIndex].field).select();
}
}
render() {
return (<div className='control-pane'>
<div className='control-section'>
<div className='col-md-9'>
<GridComponent dataSource={orderDataSource} width={400} actionComplete={this.actionComplete.bind(this)} ref={grid => this.gridInstance = grid} toolbar={this.toolbarOptions} allowPaging={true} editSettings={this.editSettings} pageSettings={this.pageSettings} actionBegin={this.actionBegin.bind(this)}>
<Inject services={[Page, Toolbar, Edit]} />
</GridComponent>
</div> |