Skip to content

Commit

Permalink
Migrate TreeList to native classes (#26767)
Browse files Browse the repository at this point in the history
Co-authored-by: Alyar <>
  • Loading branch information
Alyar666 authored Feb 28, 2024
1 parent a6bb266 commit 9b71924
Show file tree
Hide file tree
Showing 12 changed files with 1,698 additions and 1,570 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const ERROR_MESSAGE_CLASS = 'dx-error-message';
const ERROR_CLOSEBUTTON_CLASS = 'dx-closebutton';
const ACTION_CLASS = 'action';

class ErrorHandlingController extends modules.ViewController {
export class ErrorHandlingController extends modules.ViewController {
private _columnHeadersView: any;

private _rowsView: any;
Expand Down Expand Up @@ -126,7 +126,7 @@ class ErrorHandlingController extends modules.ViewController {
return $firstErrorRow;
}

removeErrorRow($row) {
removeErrorRow($row?) {
if (!$row) {
const $columnHeaders = this._columnHeadersView && this._columnHeadersView.element();
$row = $columnHeaders && $columnHeaders.find(`.${ERROR_ROW_CLASS}`);
Expand All @@ -152,7 +152,7 @@ class ErrorHandlingController extends modules.ViewController {
const data = (Base: ModuleType<DataController>) => class ErrorHandlingDataControllerExtends extends Base {
init() {
const that = this;
// @ts-expect-error

const errorHandlingController = that.getController('errorHandling');

super.init();
Expand All @@ -166,7 +166,7 @@ const data = (Base: ModuleType<DataController>) => class ErrorHandlingDataContro
if (e && e.changeType === 'loadError') {
return;
}
// @ts-expect-error

const errorHandlingController = that.getController('errorHandling');
const editingController = that.getController('editing');

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ export interface Controllers {
export: any;
draggingHeader: any;
selection: import('./selection/m_selection').SelectionController;
errorHandling: import('./error_handling/m_error_handling').ErrorHandlingController;
}

type ControllerTypes = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -996,7 +996,6 @@ export const validatingModule = {

_showErrorRow(change) {
let $popupContent;
// @ts-expect-error
const errorHandling = this.getController('errorHandling');
const items = this.getController('data').items();
const rowIndex = this.getIndexByKey(change.key, items);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const restoreFocus = function (focusedElement, selectionRange) {
export class ResizingController extends modules.ViewController {
private _refreshSizesHandler: any;

private _dataController: any;
_dataController: any;

_rowsView: any;

Expand Down
Loading

0 comments on commit 9b71924

Please sign in to comment.