Skip to content

Commit e6328a6

Browse files
authored
CardView - column chooser - fix selection mode (#30033)
1 parent 08b79f1 commit e6328a6

File tree

3 files changed

+14
-8
lines changed

3 files changed

+14
-8
lines changed

packages/devextreme/js/__internal/grids/new/card_view/main_view.tsx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,12 @@ function MainViewComponent({
9898
export class MainView extends View<MainViewProps> {
9999
protected override component = MainViewComponent;
100100

101+
private readonly config = computed(() => ({
102+
rtlEnabled: this.options.oneWay('rtlEnabled').value,
103+
disabled: this.options.oneWay('disabled').value,
104+
templatesRenderAsynchronously: this.options.oneWay('templatesRenderAsynchronously').value,
105+
}));
106+
101107
public static dependencies = [
102108
ContentView,
103109
PagerView,
@@ -143,11 +149,7 @@ export class MainView extends View<MainViewProps> {
143149
ColumnChooser: this.columnsChooser.asInferno(),
144150
EditPopup: this.editPopup.asInferno(),
145151
ContextMenu: this.contextMenu.asInferno(),
146-
config: {
147-
rtlEnabled: this.options.oneWay('rtlEnabled').value,
148-
disabled: this.options.oneWay('disabled').value,
149-
templatesRenderAsynchronously: this.options.oneWay('templatesRenderAsynchronously').value,
150-
},
152+
config: this.config.value,
151153
rootElementRef: { current: this.root! },
152154
onKeyDown: (event: KeyboardEvent): void => {
153155
this.keyboardNavigation.onKeyDown(event);

packages/devextreme/js/__internal/grids/new/grid_core/column_chooser/controller.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,10 @@ export class ColumnChooserController {
6767
const skip = !canHide && !node.selected;
6868

6969
if (!skip) {
70-
columns[columnIndex].visible = node.selected;
70+
columns[columnIndex] = {
71+
...columns[columnIndex],
72+
visible: node.selected,
73+
};
7174
}
7275
}
7376

packages/devextreme/js/__internal/grids/new/grid_core/core/view.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
import type { ReadonlySignal } from '@preact/signals-core';
77
import { effect } from '@preact/signals-core';
88
import { infernoRenderer } from '@ts/core/m_inferno_renderer';
9-
import { Component, type ComponentType } from 'inferno';
9+
import { BaseInfernoComponent } from '@ts/core/r1/runtime/inferno/base_component';
10+
import { type ComponentType } from 'inferno';
1011

1112
export abstract class View<T extends {}> {
1213
private inferno: undefined | ComponentType;
@@ -48,7 +49,7 @@ export abstract class View<T extends {}> {
4849
props: T;
4950
}
5051

51-
return class InfernoView extends Component<{}, State> {
52+
return class InfernoView extends BaseInfernoComponent<{}, State> {
5253
private readonly subscription: () => void;
5354

5455
constructor() {

0 commit comments

Comments
 (0)