Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import { isLocalStore } from '@ts/grids/grid_core/data_source_adapter/utils/stor
import type { EditingController } from '@ts/grids/grid_core/editing/m_editing';
import type { FilterSyncController } from '@ts/grids/grid_core/filter/m_filter_sync';
import type { FocusController } from '@ts/grids/grid_core/focus/m_focus';
import type { KeyboardNavigationController } from '@ts/grids/grid_core/keyboard_navigation/m_keyboard_navigation';
import modules from '@ts/grids/grid_core/m_modules';
import type {
Controllers, Module, OptionChanged, RowKey,
Expand Down Expand Up @@ -137,8 +136,6 @@ export class DataController extends DataHelperMixin(modules.Controller) {

private _filterExcludedColumn: Column | null = null;

protected _keyboardNavigationController!: KeyboardNavigationController;

protected _focusController!: FocusController;

private loadErrorHandlerProxy!: (e: Error | string) => void;
Expand All @@ -154,7 +151,6 @@ export class DataController extends DataHelperMixin(modules.Controller) {
this._adaptiveColumnsController = this.getController('adaptiveColumns');
this._editingController = this.getController('editing');
this._filterSyncController = this.getController('filterSync');
this._keyboardNavigationController = this.getController('keyboardNavigation');
this._focusController = this.getController('focus');

this._isPaging = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import type { ColumnHeadersView } from '@ts/grids/grid_core/column_headers/m_col
import type {
ColumnsResizerViewController,
} from '@ts/grids/grid_core/columns_resizing_reordering/m_columns_resizing_reordering';
import type { KeyboardNavigationController } from '@ts/grids/grid_core/keyboard_navigation/m_keyboard_navigation';
import type { ValidatingController } from '@ts/grids/grid_core/validating/m_validating';

import type { ColumnsController } from '../columns_controller/m_columns_controller';
Expand Down Expand Up @@ -76,8 +75,6 @@ export class EditorFactory extends ViewControllerWithMixin {

protected _columnsResizerController!: ColumnsResizerViewController;

protected _keyboardNavigationController!: KeyboardNavigationController;

protected _validatingController!: ValidatingController;

protected _columnHeadersView!: ColumnHeadersView;
Expand All @@ -90,7 +87,6 @@ export class EditorFactory extends ViewControllerWithMixin {

this._columnsResizerController = this.getController('columnsResizer');
this._editingController = this.getController('editing');
this._keyboardNavigationController = this.getController('keyboardNavigation');
this._columnsController = this.getController('columns');
this._validatingController = this.getController('validating');
this._columnHeadersView = this.getView('columnHeadersView');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,16 @@ const keyboardNavigation = (Base: ModuleType<KeyboardNavigationController>) => c
}
};

const editorFactory = (Base: ModuleType<EditorFactory>) => class FocusEditorFactoryExtender extends Base {
const focusEditorFactoryViewControllerExtender = (
Base: ModuleType<EditorFactory>,
) => class FocusEditorFactoryExtender extends Base {
protected _keyboardNavigationController!: KeyboardNavigationController;
Comment thread
anna-shakhova marked this conversation as resolved.
Outdated

public init(): void {
this._keyboardNavigationController = this.getController('keyboardNavigation');
super.init();
}

protected renderFocusOverlay($element, isHideBorder) {
const focusedRowEnabled = this.option('focusedRowEnabled');

Expand Down Expand Up @@ -548,9 +557,18 @@ const columns = (Base: ModuleType<ColumnsController>) => class FocusColumnsExten
}
};

const data = (Base: ModuleType<DataController>) => class FocusDataControllerExtender extends Base {
const focusDataControllerExtender = (
Base: ModuleType<DataController>,
) => class FocusDataControllerExtender extends Base {
private _isDataPushed = false;

protected _keyboardNavigationController!: KeyboardNavigationController;

public init(): void {
this._keyboardNavigationController = this.getController('keyboardNavigation');
super.init();
}

protected _applyChange(change) {
if (change && change.changeType === 'updateFocusedRow') return;

Expand Down Expand Up @@ -1044,11 +1062,11 @@ export const focusModule = {
controllers: {
keyboardNavigation,

editorFactory,
editorFactory: focusEditorFactoryViewControllerExtender,

columns,

data,
data: focusDataControllerExtender,

editing,
},
Expand Down
Loading