Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
args.node.tabIndex = 0;
});
// Unbind the slickgrid key handler from the canvas code
// We want to keep EnableCellNavigation on so that we can use the slickgrid
// public navigations functions, but we don't want the slickgrid keyhander
// to eat tab keys and prevent us from tabbing to input boxes or column headers
const canvasElement = grid.getCanvasNode();
slickgridJQ(canvasElement).off('keydown');
if (this.containerRef && this.containerRef.current) {
// slickgrid creates empty focus sink div elements that capture tab input we don't want that
// so unhook their key handlers and remove their tabindex
const firstFocus = slickgridJQ('.react-grid-container').children().first();
const lastFocus = slickgridJQ('.react-grid-container').children().last();
slickgridJQ(firstFocus).off('keydown').removeAttr('tabindex');
slickgridJQ(lastFocus).off('keydown').removeAttr('tabindex');
// Set our key handling on the actual grid viewport
slickgridJQ('.react-grid').on('keydown', this.slickgridHandleKeyDown).attr('role', 'grid').on('focusin', this.slickgridFocus);
slickgridJQ('.grid-canvas').on('keydown', this.slickgridHandleKeyDown);
}
// Setup the sorting
grid.onSort.subscribe(this.sort);
// Init to force the actual render.
grid.init();
// Set the initial sort column to our index column
const indexColumn = columns.find(c => c.field === this.props.idProperty);
if (indexColumn && indexColumn.id) {
// public navigations functions, but we don't want the slickgrid keyhander
// to eat tab keys and prevent us from tabbing to input boxes or column headers
const canvasElement = grid.getCanvasNode();
slickgridJQ(canvasElement).off('keydown');
if (this.containerRef && this.containerRef.current) {
// slickgrid creates empty focus sink div elements that capture tab input we don't want that
// so unhook their key handlers and remove their tabindex
const firstFocus = slickgridJQ('.react-grid-container').children().first();
const lastFocus = slickgridJQ('.react-grid-container').children().last();
slickgridJQ(firstFocus).off('keydown').removeAttr('tabindex');
slickgridJQ(lastFocus).off('keydown').removeAttr('tabindex');
// Set our key handling on the actual grid viewport
slickgridJQ('.react-grid').on('keydown', this.slickgridHandleKeyDown).attr('role', 'grid').on('focusin', this.slickgridFocus);
slickgridJQ('.grid-canvas').on('keydown', this.slickgridHandleKeyDown);
}
// Setup the sorting
grid.onSort.subscribe(this.sort);
// Init to force the actual render.
grid.init();
// Set the initial sort column to our index column
const indexColumn = columns.find(c => c.field === this.props.idProperty);
if (indexColumn && indexColumn.id) {
grid.setSortColumn(indexColumn.id, true);
}
// Save in our state
this.setState({ grid, fontSize });
grid.onHeaderCellRendered.subscribe((_e, args) => {
// Add a tab index onto our header cell
args.node.tabIndex = 0;
});
// Unbind the slickgrid key handler from the canvas code
// We want to keep EnableCellNavigation on so that we can use the slickgrid
// public navigations functions, but we don't want the slickgrid keyhander
// to eat tab keys and prevent us from tabbing to input boxes or column headers
const canvasElement = grid.getCanvasNode();
slickgridJQ(canvasElement).off('keydown');
if (this.containerRef && this.containerRef.current) {
// slickgrid creates empty focus sink div elements that capture tab input we don't want that
// so unhook their key handlers and remove their tabindex
const firstFocus = slickgridJQ('.react-grid-container').children().first();
const lastFocus = slickgridJQ('.react-grid-container').children().last();
slickgridJQ(firstFocus).off('keydown').removeAttr('tabindex');
slickgridJQ(lastFocus).off('keydown').removeAttr('tabindex');
// Set our key handling on the actual grid viewport
slickgridJQ('.react-grid').on('keydown', this.slickgridHandleKeyDown).attr('role', 'grid').on('focusin', this.slickgridFocus);
slickgridJQ('.grid-canvas').on('keydown', this.slickgridHandleKeyDown);
}
// Setup the sorting
grid.onSort.subscribe(this.sort);
// Init to force the actual render.
grid.init();
// Set the initial sort column to our index column
// We want to keep EnableCellNavigation on so that we can use the slickgrid
// public navigations functions, but we don't want the slickgrid keyhander
// to eat tab keys and prevent us from tabbing to input boxes or column headers
const canvasElement = grid.getCanvasNode();
slickgridJQ(canvasElement).off('keydown');
if (this.containerRef && this.containerRef.current) {
// slickgrid creates empty focus sink div elements that capture tab input we don't want that
// so unhook their key handlers and remove their tabindex
const firstFocus = slickgridJQ('.react-grid-container').children().first();
const lastFocus = slickgridJQ('.react-grid-container').children().last();
slickgridJQ(firstFocus).off('keydown').removeAttr('tabindex');
slickgridJQ(lastFocus).off('keydown').removeAttr('tabindex');
// Set our key handling on the actual grid viewport
slickgridJQ('.react-grid').on('keydown', this.slickgridHandleKeyDown).attr('role', 'grid').on('focusin', this.slickgridFocus);
slickgridJQ('.grid-canvas').on('keydown', this.slickgridHandleKeyDown);
}
// Setup the sorting
grid.onSort.subscribe(this.sort);
// Init to force the actual render.
grid.init();
// Set the initial sort column to our index column
const indexColumn = columns.find(c => c.field === this.props.idProperty);
if (indexColumn && indexColumn.id) {
grid.setSortColumn(indexColumn.id, true);
}
// Save in our state
});
// Unbind the slickgrid key handler from the canvas code
// We want to keep EnableCellNavigation on so that we can use the slickgrid
// public navigations functions, but we don't want the slickgrid keyhander
// to eat tab keys and prevent us from tabbing to input boxes or column headers
const canvasElement = grid.getCanvasNode();
slickgridJQ(canvasElement).off('keydown');
if (this.containerRef && this.containerRef.current) {
// slickgrid creates empty focus sink div elements that capture tab input we don't want that
// so unhook their key handlers and remove their tabindex
const firstFocus = slickgridJQ('.react-grid-container').children().first();
const lastFocus = slickgridJQ('.react-grid-container').children().last();
slickgridJQ(firstFocus).off('keydown').removeAttr('tabindex');
slickgridJQ(lastFocus).off('keydown').removeAttr('tabindex');
// Set our key handling on the actual grid viewport
slickgridJQ('.react-grid').on('keydown', this.slickgridHandleKeyDown).attr('role', 'grid').on('focusin', this.slickgridFocus);
slickgridJQ('.grid-canvas').on('keydown', this.slickgridHandleKeyDown);
}
// Setup the sorting
grid.onSort.subscribe(this.sort);
// Init to force the actual render.
grid.init();
// Set the initial sort column to our index column
const indexColumn = columns.find(c => c.field === this.props.idProperty);
if (indexColumn && indexColumn.id) {
grid.setSortColumn(indexColumn.id, true);
});
// Setup the filter render
grid.onHeaderRowCellRendered.subscribe(this.renderFilterCell);
grid.onHeaderCellRendered.subscribe((_e, args) => {
// Add a tab index onto our header cell
args.node.tabIndex = 0;
});
// Unbind the slickgrid key handler from the canvas code
// We want to keep EnableCellNavigation on so that we can use the slickgrid
// public navigations functions, but we don't want the slickgrid keyhander
// to eat tab keys and prevent us from tabbing to input boxes or column headers
const canvasElement = grid.getCanvasNode();
slickgridJQ(canvasElement).off('keydown');
if (this.containerRef && this.containerRef.current) {
// slickgrid creates empty focus sink div elements that capture tab input we don't want that
// so unhook their key handlers and remove their tabindex
const firstFocus = slickgridJQ('.react-grid-container').children().first();
const lastFocus = slickgridJQ('.react-grid-container').children().last();
slickgridJQ(firstFocus).off('keydown').removeAttr('tabindex');
slickgridJQ(lastFocus).off('keydown').removeAttr('tabindex');
// Set our key handling on the actual grid viewport
slickgridJQ('.react-grid').on('keydown', this.slickgridHandleKeyDown).attr('role', 'grid').on('focusin', this.slickgridFocus);
slickgridJQ('.grid-canvas').on('keydown', this.slickgridHandleKeyDown);
}
// Setup the sorting
grid.onSort.subscribe(this.sort);