@dvrd/dvr-controls 1.0.48 → 1.0.49
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/package.json
CHANGED
package/src/js/dialog/dialog.tsx
CHANGED
|
@@ -121,10 +121,10 @@ export default class Dialog extends React.Component<Props, State> {
|
|
|
121
121
|
return {color: convertColor(color)};
|
|
122
122
|
};
|
|
123
123
|
|
|
124
|
-
extendOnClick = (
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
124
|
+
extendOnClick = (action: DialogActionShape): MouseEventHandler => (evt: any) => {
|
|
125
|
+
if (!action.keepOpen)
|
|
126
|
+
this.onClose();
|
|
127
|
+
action.onClick?.(evt);
|
|
128
128
|
};
|
|
129
129
|
|
|
130
130
|
getActions = () => {
|
|
@@ -146,7 +146,7 @@ export default class Dialog extends React.Component<Props, State> {
|
|
|
146
146
|
type={this.buttonVariant} containerClass='dialogButton'/>
|
|
147
147
|
);
|
|
148
148
|
return (
|
|
149
|
-
<ButtonController {...keyProp} label={action.label} onClick={this.extendOnClick(action
|
|
149
|
+
<ButtonController {...keyProp} label={action.label} onClick={this.extendOnClick(action)}
|
|
150
150
|
type={this.buttonVariant} containerClass='dialogButton' primary={action.primary}/>
|
|
151
151
|
);
|
|
152
152
|
};
|