Skip to content

Commit cac2431

Browse files
authored
ButtonGroup, DropDownButton, ActionSheet: extend type with plain string (T1279589) (DevExpress#29657)
1 parent a162d2a commit cac2431

File tree

13 files changed

+20
-20
lines changed

13 files changed

+20
-20
lines changed

packages/devextreme-angular/src/ui/action-sheet/nested/item-dxi.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,10 @@ export class DxiActionSheetItemComponent extends CollectionNestedOption implemen
8686
}
8787

8888
@Input()
89-
get type(): ButtonType {
89+
get type(): ButtonType | string {
9090
return this._getOption('type');
9191
}
92-
set type(value: ButtonType) {
92+
set type(value: ButtonType | string) {
9393
this._setOption('type', value);
9494
}
9595

packages/devextreme-angular/src/ui/button-group/nested/item-dxi.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,10 @@ export class DxiButtonGroupItemComponent extends CollectionNestedOption implemen
8585
}
8686

8787
@Input()
88-
get type(): ButtonType {
88+
get type(): ButtonType | string {
8989
return this._getOption('type');
9090
}
91-
set type(value: ButtonType) {
91+
set type(value: ButtonType | string) {
9292
this._setOption('type', value);
9393
}
9494

packages/devextreme-angular/src/ui/drop-down-button/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -463,10 +463,10 @@ export class DxDropDownButtonComponent extends DxComponent implements OnDestroy,
463463
464464
*/
465465
@Input()
466-
get type(): ButtonType {
466+
get type(): ButtonType | string {
467467
return this._getOption('type');
468468
}
469-
set type(value: ButtonType) {
469+
set type(value: ButtonType | string) {
470470
this._setOption('type', value);
471471
}
472472

@@ -792,7 +792,7 @@ export class DxDropDownButtonComponent extends DxComponent implements OnDestroy,
792792
* This member supports the internal infrastructure and is not intended to be used directly from your code.
793793
794794
*/
795-
@Output() typeChange: EventEmitter<ButtonType>;
795+
@Output() typeChange: EventEmitter<ButtonType | string>;
796796

797797
/**
798798

packages/devextreme-angular/src/ui/nested/base/button-group-item-dxi.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,10 @@ export abstract class DxiButtonGroupItem extends CollectionNestedOption {
9898
this._setOption('stylingMode', value);
9999
}
100100

101-
get type(): ButtonType {
101+
get type(): ButtonType | string {
102102
return this._getOption('type');
103103
}
104-
set type(value: ButtonType) {
104+
set type(value: ButtonType | string) {
105105
this._setOption('type', value);
106106
}
107107

packages/devextreme-react/src/action-sheet.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ type IItemProps = React.PropsWithChildren<{
102102
stylingMode?: ButtonStyle;
103103
template?: ((itemData: CollectionWidgetItem, itemIndex: number, itemElement: any) => string | any) | template;
104104
text?: string;
105-
type?: ButtonType;
105+
type?: ButtonType | string;
106106
render?: (...params: any) => React.ReactNode;
107107
component?: React.ComponentType<any>;
108108
}>

packages/devextreme-react/src/button-group.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ type IItemProps = React.PropsWithChildren<{
9595
icon?: string;
9696
template?: ((itemData: CollectionWidgetItem, itemIndex: number, itemElement: any) => string | any) | template;
9797
text?: string;
98-
type?: ButtonType;
98+
type?: ButtonType | string;
9999
visible?: boolean;
100100
render?: (...params: any) => React.ReactNode;
101101
component?: React.ComponentType<any>;

packages/devextreme-vue/src/action-sheet.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ const DxItemConfig = {
164164
stylingMode: String as PropType<ButtonStyle>,
165165
template: {},
166166
text: String,
167-
type: String as PropType<ButtonType>
167+
type: String as PropType<ButtonType | string>
168168
}
169169
};
170170

packages/devextreme-vue/src/button-group.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ const DxItemConfig = {
146146
icon: String,
147147
template: {},
148148
text: String,
149-
type: String as PropType<ButtonType>,
149+
type: String as PropType<ButtonType | string>,
150150
visible: Boolean
151151
}
152152
};

packages/devextreme-vue/src/drop-down-button.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ const componentConfig = {
145145
tabIndex: Number,
146146
template: {},
147147
text: String,
148-
type: String as PropType<ButtonType>,
148+
type: String as PropType<ButtonType | string>,
149149
useItemTextAsTitle: Boolean,
150150
useSelectMode: Boolean,
151151
visible: Boolean,

packages/devextreme/js/ui/action_sheet.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ export interface dxActionSheetItem<TKey = any> extends CollectionWidgetItem {
244244
* @default 'normal'
245245
* @public
246246
*/
247-
type?: ButtonType;
247+
type?: ButtonType | string;
248248
/**
249249
* @docid
250250
* @default 'outlined'

0 commit comments

Comments
 (0)