@progress/kendo-react-buttons 5.18.0-dev.202309121534 → 5.18.0-dev.202309131321
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/js/kendo-react-buttons.js +1 -1
- package/dist/es/ListButton/DropDownButton.d.ts +2 -0
- package/dist/es/ListButton/DropDownButton.js +28 -12
- package/dist/es/ListButton/SplitButton.d.ts +2 -0
- package/dist/es/ListButton/SplitButton.js +27 -15
- package/dist/es/package-metadata.js +1 -1
- package/dist/npm/ListButton/DropDownButton.d.ts +2 -0
- package/dist/npm/ListButton/DropDownButton.js +28 -12
- package/dist/npm/ListButton/SplitButton.d.ts +2 -0
- package/dist/npm/ListButton/SplitButton.js +27 -15
- package/dist/npm/package-metadata.js +1 -1
- package/dist/systemjs/kendo-react-buttons.js +1 -1
- package/package.json +12 -12
|
@@ -83,6 +83,7 @@ export declare class DropDownButton extends React.Component<DropDownButtonProps,
|
|
|
83
83
|
private skipFocus;
|
|
84
84
|
private guid;
|
|
85
85
|
private buttonsData;
|
|
86
|
+
private openedDuringOnChange?;
|
|
86
87
|
constructor(props: DropDownButtonProps);
|
|
87
88
|
private get opened();
|
|
88
89
|
/**
|
|
@@ -101,6 +102,7 @@ export declare class DropDownButton extends React.Component<DropDownButtonProps,
|
|
|
101
102
|
private switchFocus;
|
|
102
103
|
private handleFocus;
|
|
103
104
|
private handleBlur;
|
|
105
|
+
private setOpen;
|
|
104
106
|
private onItemClick;
|
|
105
107
|
private onItemDown;
|
|
106
108
|
private mouseDown;
|
|
@@ -77,11 +77,13 @@ var DropDownButton = /** @class */ (function (_super) {
|
|
|
77
77
|
var focusedIndex = _this.state.focusedIndex;
|
|
78
78
|
if (event.altKey) {
|
|
79
79
|
if (!_this.opened && event.keyCode === Keys.down) {
|
|
80
|
+
_this.setOpen(true);
|
|
80
81
|
_this.dispatchPopupEvent(event, true);
|
|
81
|
-
_this.setState({ focusedIndex: 0
|
|
82
|
+
_this.setState({ focusedIndex: 0 });
|
|
82
83
|
}
|
|
83
84
|
else if (_this.opened && event.keyCode === Keys.up) {
|
|
84
|
-
_this.setState({ focusedIndex: -1
|
|
85
|
+
_this.setState({ focusedIndex: -1 });
|
|
86
|
+
_this.setOpen(false);
|
|
85
87
|
}
|
|
86
88
|
return;
|
|
87
89
|
}
|
|
@@ -93,15 +95,18 @@ var DropDownButton = /** @class */ (function (_super) {
|
|
|
93
95
|
// Prevent default because otherwise when an item is selected
|
|
94
96
|
// click on the default button gets emitted which opens the popup again.
|
|
95
97
|
event.preventDefault();
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
if (
|
|
99
|
-
_this.dispatchPopupEvent(event,
|
|
98
|
+
var notOpened = !_this.opened;
|
|
99
|
+
_this.setOpen(notOpened);
|
|
100
|
+
if (notOpened) {
|
|
101
|
+
_this.dispatchPopupEvent(event, true);
|
|
102
|
+
_this.setState({ focusedIndex: _this.opened ? -1 : 0 });
|
|
100
103
|
}
|
|
104
|
+
return;
|
|
101
105
|
}
|
|
102
106
|
else if (_this.opened && event.keyCode === Keys.esc) {
|
|
103
|
-
|
|
104
|
-
|
|
107
|
+
_this.setState({ focusedIndex: -1 });
|
|
108
|
+
_this.setOpen(false);
|
|
109
|
+
return;
|
|
105
110
|
}
|
|
106
111
|
if (_this.opened) {
|
|
107
112
|
var newFocused = navigation(focusedIndex, event.keyCode, event.altKey, _this.buttonsData.length);
|
|
@@ -131,11 +136,17 @@ var DropDownButton = /** @class */ (function (_super) {
|
|
|
131
136
|
if (_this.skipFocus) {
|
|
132
137
|
return;
|
|
133
138
|
}
|
|
134
|
-
_this.setState({ focused: false,
|
|
139
|
+
_this.setState({ focused: false, focusedIndex: -1 });
|
|
140
|
+
_this.setOpen(false);
|
|
135
141
|
dispatchEvent(_this.props.onBlur, event, _this, undefined);
|
|
136
142
|
};
|
|
143
|
+
_this.setOpen = function (value) {
|
|
144
|
+
_this.openedDuringOnChange = value;
|
|
145
|
+
_this.setState({ opened: value });
|
|
146
|
+
};
|
|
137
147
|
_this.onItemClick = function (event, clickedItemIndex) {
|
|
138
|
-
_this.setState({ focusedIndex: -1
|
|
148
|
+
_this.setState({ focusedIndex: -1 });
|
|
149
|
+
_this.setOpen(false);
|
|
139
150
|
_this.dispatchClickEvent(event, clickedItemIndex);
|
|
140
151
|
};
|
|
141
152
|
_this.onItemDown = function (event) {
|
|
@@ -179,23 +190,28 @@ var DropDownButton = /** @class */ (function (_super) {
|
|
|
179
190
|
}
|
|
180
191
|
var toOpen = !_this.opened;
|
|
181
192
|
_this.setState({
|
|
182
|
-
opened: toOpen,
|
|
183
193
|
focused: true,
|
|
184
194
|
focusedIndex: toOpen ? 0 : -1
|
|
185
195
|
});
|
|
196
|
+
_this.setOpen(toOpen);
|
|
186
197
|
if (toOpen) {
|
|
187
198
|
_this.dispatchPopupEvent(event, toOpen);
|
|
188
199
|
}
|
|
189
200
|
};
|
|
190
201
|
_this.dispatchPopupEvent = function (dispatchedEvent, open) {
|
|
191
202
|
dispatchEvent(open ? _this.props.onOpen : _this.props.onClose, dispatchedEvent, _this, undefined);
|
|
203
|
+
_this.openedDuringOnChange = undefined;
|
|
192
204
|
};
|
|
193
205
|
validatePackage(packageMetadata);
|
|
194
206
|
return _this;
|
|
195
207
|
}
|
|
196
208
|
Object.defineProperty(DropDownButton.prototype, "opened", {
|
|
197
209
|
get: function () {
|
|
198
|
-
return this.
|
|
210
|
+
return this.openedDuringOnChange !== undefined
|
|
211
|
+
? this.openedDuringOnChange
|
|
212
|
+
: this.props.opened === undefined
|
|
213
|
+
? this.state.opened
|
|
214
|
+
: this.props.opened;
|
|
199
215
|
},
|
|
200
216
|
enumerable: false,
|
|
201
217
|
configurable: true
|
|
@@ -85,6 +85,7 @@ export declare class SplitButton extends React.Component<SplitButtonProps, Split
|
|
|
85
85
|
private guid;
|
|
86
86
|
private skipFocus;
|
|
87
87
|
private buttonsData;
|
|
88
|
+
private openedDuringOnChange?;
|
|
88
89
|
constructor(props: SplitButtonProps);
|
|
89
90
|
private get opened();
|
|
90
91
|
/**
|
|
@@ -102,6 +103,7 @@ export declare class SplitButton extends React.Component<SplitButtonProps, Split
|
|
|
102
103
|
private onKeyDown;
|
|
103
104
|
private switchFocus;
|
|
104
105
|
private onFocus;
|
|
106
|
+
private setOpen;
|
|
105
107
|
private onItemClick;
|
|
106
108
|
private onBlur;
|
|
107
109
|
private dispatchClickEvent;
|
|
@@ -68,10 +68,12 @@ var SplitButton = /** @class */ (function (_super) {
|
|
|
68
68
|
if (event.altKey) {
|
|
69
69
|
if (!_this.opened && event.keyCode === Keys.down) {
|
|
70
70
|
_this.dispatchPopupEvent(event, true);
|
|
71
|
-
_this.setState({ focusedIndex: 0
|
|
71
|
+
_this.setState({ focusedIndex: 0 });
|
|
72
|
+
_this.setOpen(true);
|
|
72
73
|
}
|
|
73
74
|
else if (_this.opened && event.keyCode === Keys.up) {
|
|
74
|
-
_this.setState({ focusedIndex: -1
|
|
75
|
+
_this.setState({ focusedIndex: -1 });
|
|
76
|
+
_this.setOpen(false);
|
|
75
77
|
}
|
|
76
78
|
return;
|
|
77
79
|
}
|
|
@@ -83,19 +85,19 @@ var SplitButton = /** @class */ (function (_super) {
|
|
|
83
85
|
_this.dispatchClickEvent(event, focusedIndex);
|
|
84
86
|
if (focusedIndex >= 0) {
|
|
85
87
|
newState = {
|
|
86
|
-
focusedIndex: _this.opened ? -1 : 0
|
|
87
|
-
opened: !_this.opened
|
|
88
|
+
focusedIndex: _this.opened ? -1 : 0
|
|
88
89
|
};
|
|
89
|
-
|
|
90
|
-
|
|
90
|
+
var notOpened = !_this.opened;
|
|
91
|
+
_this.setOpen(notOpened);
|
|
92
|
+
if (notOpened) {
|
|
93
|
+
_this.dispatchPopupEvent(event, notOpened);
|
|
91
94
|
}
|
|
92
95
|
}
|
|
93
96
|
}
|
|
94
97
|
else if (_this.opened && event.keyCode === Keys.esc) {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
};
|
|
98
|
+
_this.setState({ focusedIndex: -1 });
|
|
99
|
+
_this.setOpen(false);
|
|
100
|
+
return;
|
|
99
101
|
}
|
|
100
102
|
if (_this.opened) {
|
|
101
103
|
var newFocused = navigation(focusedIndex, event.keyCode, event.altKey, _this.buttonsData.length);
|
|
@@ -126,10 +128,15 @@ var SplitButton = /** @class */ (function (_super) {
|
|
|
126
128
|
dispatchEvent(_this.props.onFocus, event, _this, undefined);
|
|
127
129
|
_this.setState({ focused: true });
|
|
128
130
|
};
|
|
131
|
+
_this.setOpen = function (value) {
|
|
132
|
+
_this.openedDuringOnChange = value;
|
|
133
|
+
_this.setState({ opened: value });
|
|
134
|
+
};
|
|
129
135
|
_this.onItemClick = function (event, clickedItemIndex) {
|
|
130
136
|
var opened = _this.opened;
|
|
131
137
|
if (opened) {
|
|
132
|
-
_this.setState({ focusedIndex: 0
|
|
138
|
+
_this.setState({ focusedIndex: 0 });
|
|
139
|
+
_this.setOpen(false);
|
|
133
140
|
}
|
|
134
141
|
_this.dispatchClickEvent(event, clickedItemIndex);
|
|
135
142
|
};
|
|
@@ -139,9 +146,9 @@ var SplitButton = /** @class */ (function (_super) {
|
|
|
139
146
|
}
|
|
140
147
|
_this.setState({
|
|
141
148
|
focused: false,
|
|
142
|
-
focusedIndex: -1
|
|
143
|
-
opened: false
|
|
149
|
+
focusedIndex: -1
|
|
144
150
|
});
|
|
151
|
+
_this.setOpen(false);
|
|
145
152
|
dispatchEvent(_this.props.onBlur, event, _this, undefined);
|
|
146
153
|
};
|
|
147
154
|
_this.onPopupClose = function () {
|
|
@@ -174,9 +181,9 @@ var SplitButton = /** @class */ (function (_super) {
|
|
|
174
181
|
}
|
|
175
182
|
_this.setState({
|
|
176
183
|
focusedIndex: toOpen ? 0 : -1,
|
|
177
|
-
opened: toOpen,
|
|
178
184
|
focused: true
|
|
179
185
|
});
|
|
186
|
+
_this.setOpen(toOpen);
|
|
180
187
|
}
|
|
181
188
|
};
|
|
182
189
|
_this.onDownSplitPart = function (event) {
|
|
@@ -194,13 +201,18 @@ var SplitButton = /** @class */ (function (_super) {
|
|
|
194
201
|
};
|
|
195
202
|
_this.dispatchPopupEvent = function (dispatchedEvent, open) {
|
|
196
203
|
dispatchEvent(open ? _this.props.onOpen : _this.props.onClose, dispatchedEvent, _this, undefined);
|
|
204
|
+
_this.openedDuringOnChange = undefined;
|
|
197
205
|
};
|
|
198
206
|
validatePackage(packageMetadata);
|
|
199
207
|
return _this;
|
|
200
208
|
}
|
|
201
209
|
Object.defineProperty(SplitButton.prototype, "opened", {
|
|
202
210
|
get: function () {
|
|
203
|
-
return this.
|
|
211
|
+
return this.openedDuringOnChange !== undefined
|
|
212
|
+
? this.openedDuringOnChange
|
|
213
|
+
: this.props.opened === undefined
|
|
214
|
+
? this.state.opened
|
|
215
|
+
: this.props.opened;
|
|
204
216
|
},
|
|
205
217
|
enumerable: false,
|
|
206
218
|
configurable: true
|
|
@@ -5,7 +5,7 @@ export var packageMetadata = {
|
|
|
5
5
|
name: '@progress/kendo-react-buttons',
|
|
6
6
|
productName: 'KendoReact',
|
|
7
7
|
productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'],
|
|
8
|
-
publishDate:
|
|
8
|
+
publishDate: 1694607967,
|
|
9
9
|
version: '',
|
|
10
10
|
licensingDocsUrl: 'https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning'
|
|
11
11
|
};
|
|
@@ -83,6 +83,7 @@ export declare class DropDownButton extends React.Component<DropDownButtonProps,
|
|
|
83
83
|
private skipFocus;
|
|
84
84
|
private guid;
|
|
85
85
|
private buttonsData;
|
|
86
|
+
private openedDuringOnChange?;
|
|
86
87
|
constructor(props: DropDownButtonProps);
|
|
87
88
|
private get opened();
|
|
88
89
|
/**
|
|
@@ -101,6 +102,7 @@ export declare class DropDownButton extends React.Component<DropDownButtonProps,
|
|
|
101
102
|
private switchFocus;
|
|
102
103
|
private handleFocus;
|
|
103
104
|
private handleBlur;
|
|
105
|
+
private setOpen;
|
|
104
106
|
private onItemClick;
|
|
105
107
|
private onItemDown;
|
|
106
108
|
private mouseDown;
|
|
@@ -80,11 +80,13 @@ var DropDownButton = /** @class */ (function (_super) {
|
|
|
80
80
|
var focusedIndex = _this.state.focusedIndex;
|
|
81
81
|
if (event.altKey) {
|
|
82
82
|
if (!_this.opened && event.keyCode === kendo_react_common_1.Keys.down) {
|
|
83
|
+
_this.setOpen(true);
|
|
83
84
|
_this.dispatchPopupEvent(event, true);
|
|
84
|
-
_this.setState({ focusedIndex: 0
|
|
85
|
+
_this.setState({ focusedIndex: 0 });
|
|
85
86
|
}
|
|
86
87
|
else if (_this.opened && event.keyCode === kendo_react_common_1.Keys.up) {
|
|
87
|
-
_this.setState({ focusedIndex: -1
|
|
88
|
+
_this.setState({ focusedIndex: -1 });
|
|
89
|
+
_this.setOpen(false);
|
|
88
90
|
}
|
|
89
91
|
return;
|
|
90
92
|
}
|
|
@@ -96,15 +98,18 @@ var DropDownButton = /** @class */ (function (_super) {
|
|
|
96
98
|
// Prevent default because otherwise when an item is selected
|
|
97
99
|
// click on the default button gets emitted which opens the popup again.
|
|
98
100
|
event.preventDefault();
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
if (
|
|
102
|
-
_this.dispatchPopupEvent(event,
|
|
101
|
+
var notOpened = !_this.opened;
|
|
102
|
+
_this.setOpen(notOpened);
|
|
103
|
+
if (notOpened) {
|
|
104
|
+
_this.dispatchPopupEvent(event, true);
|
|
105
|
+
_this.setState({ focusedIndex: _this.opened ? -1 : 0 });
|
|
103
106
|
}
|
|
107
|
+
return;
|
|
104
108
|
}
|
|
105
109
|
else if (_this.opened && event.keyCode === kendo_react_common_1.Keys.esc) {
|
|
106
|
-
|
|
107
|
-
|
|
110
|
+
_this.setState({ focusedIndex: -1 });
|
|
111
|
+
_this.setOpen(false);
|
|
112
|
+
return;
|
|
108
113
|
}
|
|
109
114
|
if (_this.opened) {
|
|
110
115
|
var newFocused = (0, navigation_1.navigate)(focusedIndex, event.keyCode, event.altKey, _this.buttonsData.length);
|
|
@@ -134,11 +139,17 @@ var DropDownButton = /** @class */ (function (_super) {
|
|
|
134
139
|
if (_this.skipFocus) {
|
|
135
140
|
return;
|
|
136
141
|
}
|
|
137
|
-
_this.setState({ focused: false,
|
|
142
|
+
_this.setState({ focused: false, focusedIndex: -1 });
|
|
143
|
+
_this.setOpen(false);
|
|
138
144
|
(0, kendo_react_common_2.dispatchEvent)(_this.props.onBlur, event, _this, undefined);
|
|
139
145
|
};
|
|
146
|
+
_this.setOpen = function (value) {
|
|
147
|
+
_this.openedDuringOnChange = value;
|
|
148
|
+
_this.setState({ opened: value });
|
|
149
|
+
};
|
|
140
150
|
_this.onItemClick = function (event, clickedItemIndex) {
|
|
141
|
-
_this.setState({ focusedIndex: -1
|
|
151
|
+
_this.setState({ focusedIndex: -1 });
|
|
152
|
+
_this.setOpen(false);
|
|
142
153
|
_this.dispatchClickEvent(event, clickedItemIndex);
|
|
143
154
|
};
|
|
144
155
|
_this.onItemDown = function (event) {
|
|
@@ -182,23 +193,28 @@ var DropDownButton = /** @class */ (function (_super) {
|
|
|
182
193
|
}
|
|
183
194
|
var toOpen = !_this.opened;
|
|
184
195
|
_this.setState({
|
|
185
|
-
opened: toOpen,
|
|
186
196
|
focused: true,
|
|
187
197
|
focusedIndex: toOpen ? 0 : -1
|
|
188
198
|
});
|
|
199
|
+
_this.setOpen(toOpen);
|
|
189
200
|
if (toOpen) {
|
|
190
201
|
_this.dispatchPopupEvent(event, toOpen);
|
|
191
202
|
}
|
|
192
203
|
};
|
|
193
204
|
_this.dispatchPopupEvent = function (dispatchedEvent, open) {
|
|
194
205
|
(0, kendo_react_common_2.dispatchEvent)(open ? _this.props.onOpen : _this.props.onClose, dispatchedEvent, _this, undefined);
|
|
206
|
+
_this.openedDuringOnChange = undefined;
|
|
195
207
|
};
|
|
196
208
|
(0, kendo_react_common_3.validatePackage)(package_metadata_1.packageMetadata);
|
|
197
209
|
return _this;
|
|
198
210
|
}
|
|
199
211
|
Object.defineProperty(DropDownButton.prototype, "opened", {
|
|
200
212
|
get: function () {
|
|
201
|
-
return this.
|
|
213
|
+
return this.openedDuringOnChange !== undefined
|
|
214
|
+
? this.openedDuringOnChange
|
|
215
|
+
: this.props.opened === undefined
|
|
216
|
+
? this.state.opened
|
|
217
|
+
: this.props.opened;
|
|
202
218
|
},
|
|
203
219
|
enumerable: false,
|
|
204
220
|
configurable: true
|
|
@@ -85,6 +85,7 @@ export declare class SplitButton extends React.Component<SplitButtonProps, Split
|
|
|
85
85
|
private guid;
|
|
86
86
|
private skipFocus;
|
|
87
87
|
private buttonsData;
|
|
88
|
+
private openedDuringOnChange?;
|
|
88
89
|
constructor(props: SplitButtonProps);
|
|
89
90
|
private get opened();
|
|
90
91
|
/**
|
|
@@ -102,6 +103,7 @@ export declare class SplitButton extends React.Component<SplitButtonProps, Split
|
|
|
102
103
|
private onKeyDown;
|
|
103
104
|
private switchFocus;
|
|
104
105
|
private onFocus;
|
|
106
|
+
private setOpen;
|
|
105
107
|
private onItemClick;
|
|
106
108
|
private onBlur;
|
|
107
109
|
private dispatchClickEvent;
|
|
@@ -71,10 +71,12 @@ var SplitButton = /** @class */ (function (_super) {
|
|
|
71
71
|
if (event.altKey) {
|
|
72
72
|
if (!_this.opened && event.keyCode === kendo_react_common_1.Keys.down) {
|
|
73
73
|
_this.dispatchPopupEvent(event, true);
|
|
74
|
-
_this.setState({ focusedIndex: 0
|
|
74
|
+
_this.setState({ focusedIndex: 0 });
|
|
75
|
+
_this.setOpen(true);
|
|
75
76
|
}
|
|
76
77
|
else if (_this.opened && event.keyCode === kendo_react_common_1.Keys.up) {
|
|
77
|
-
_this.setState({ focusedIndex: -1
|
|
78
|
+
_this.setState({ focusedIndex: -1 });
|
|
79
|
+
_this.setOpen(false);
|
|
78
80
|
}
|
|
79
81
|
return;
|
|
80
82
|
}
|
|
@@ -86,19 +88,19 @@ var SplitButton = /** @class */ (function (_super) {
|
|
|
86
88
|
_this.dispatchClickEvent(event, focusedIndex);
|
|
87
89
|
if (focusedIndex >= 0) {
|
|
88
90
|
newState = {
|
|
89
|
-
focusedIndex: _this.opened ? -1 : 0
|
|
90
|
-
opened: !_this.opened
|
|
91
|
+
focusedIndex: _this.opened ? -1 : 0
|
|
91
92
|
};
|
|
92
|
-
|
|
93
|
-
|
|
93
|
+
var notOpened = !_this.opened;
|
|
94
|
+
_this.setOpen(notOpened);
|
|
95
|
+
if (notOpened) {
|
|
96
|
+
_this.dispatchPopupEvent(event, notOpened);
|
|
94
97
|
}
|
|
95
98
|
}
|
|
96
99
|
}
|
|
97
100
|
else if (_this.opened && event.keyCode === kendo_react_common_1.Keys.esc) {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
};
|
|
101
|
+
_this.setState({ focusedIndex: -1 });
|
|
102
|
+
_this.setOpen(false);
|
|
103
|
+
return;
|
|
102
104
|
}
|
|
103
105
|
if (_this.opened) {
|
|
104
106
|
var newFocused = (0, navigation_1.navigate)(focusedIndex, event.keyCode, event.altKey, _this.buttonsData.length);
|
|
@@ -129,10 +131,15 @@ var SplitButton = /** @class */ (function (_super) {
|
|
|
129
131
|
(0, kendo_react_common_2.dispatchEvent)(_this.props.onFocus, event, _this, undefined);
|
|
130
132
|
_this.setState({ focused: true });
|
|
131
133
|
};
|
|
134
|
+
_this.setOpen = function (value) {
|
|
135
|
+
_this.openedDuringOnChange = value;
|
|
136
|
+
_this.setState({ opened: value });
|
|
137
|
+
};
|
|
132
138
|
_this.onItemClick = function (event, clickedItemIndex) {
|
|
133
139
|
var opened = _this.opened;
|
|
134
140
|
if (opened) {
|
|
135
|
-
_this.setState({ focusedIndex: 0
|
|
141
|
+
_this.setState({ focusedIndex: 0 });
|
|
142
|
+
_this.setOpen(false);
|
|
136
143
|
}
|
|
137
144
|
_this.dispatchClickEvent(event, clickedItemIndex);
|
|
138
145
|
};
|
|
@@ -142,9 +149,9 @@ var SplitButton = /** @class */ (function (_super) {
|
|
|
142
149
|
}
|
|
143
150
|
_this.setState({
|
|
144
151
|
focused: false,
|
|
145
|
-
focusedIndex: -1
|
|
146
|
-
opened: false
|
|
152
|
+
focusedIndex: -1
|
|
147
153
|
});
|
|
154
|
+
_this.setOpen(false);
|
|
148
155
|
(0, kendo_react_common_2.dispatchEvent)(_this.props.onBlur, event, _this, undefined);
|
|
149
156
|
};
|
|
150
157
|
_this.onPopupClose = function () {
|
|
@@ -177,9 +184,9 @@ var SplitButton = /** @class */ (function (_super) {
|
|
|
177
184
|
}
|
|
178
185
|
_this.setState({
|
|
179
186
|
focusedIndex: toOpen ? 0 : -1,
|
|
180
|
-
opened: toOpen,
|
|
181
187
|
focused: true
|
|
182
188
|
});
|
|
189
|
+
_this.setOpen(toOpen);
|
|
183
190
|
}
|
|
184
191
|
};
|
|
185
192
|
_this.onDownSplitPart = function (event) {
|
|
@@ -197,13 +204,18 @@ var SplitButton = /** @class */ (function (_super) {
|
|
|
197
204
|
};
|
|
198
205
|
_this.dispatchPopupEvent = function (dispatchedEvent, open) {
|
|
199
206
|
(0, kendo_react_common_2.dispatchEvent)(open ? _this.props.onOpen : _this.props.onClose, dispatchedEvent, _this, undefined);
|
|
207
|
+
_this.openedDuringOnChange = undefined;
|
|
200
208
|
};
|
|
201
209
|
(0, kendo_react_common_3.validatePackage)(package_metadata_1.packageMetadata);
|
|
202
210
|
return _this;
|
|
203
211
|
}
|
|
204
212
|
Object.defineProperty(SplitButton.prototype, "opened", {
|
|
205
213
|
get: function () {
|
|
206
|
-
return this.
|
|
214
|
+
return this.openedDuringOnChange !== undefined
|
|
215
|
+
? this.openedDuringOnChange
|
|
216
|
+
: this.props.opened === undefined
|
|
217
|
+
? this.state.opened
|
|
218
|
+
: this.props.opened;
|
|
207
219
|
},
|
|
208
220
|
enumerable: false,
|
|
209
221
|
configurable: true
|
|
@@ -8,7 +8,7 @@ exports.packageMetadata = {
|
|
|
8
8
|
name: '@progress/kendo-react-buttons',
|
|
9
9
|
productName: 'KendoReact',
|
|
10
10
|
productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'],
|
|
11
|
-
publishDate:
|
|
11
|
+
publishDate: 1694607967,
|
|
12
12
|
version: '',
|
|
13
13
|
licensingDocsUrl: 'https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning'
|
|
14
14
|
};
|