Skip to content

Commit b0da979

Browse files
fix(VariantManagement): fix type extraction for button click handler (#5095)
Fixes #5072
1 parent 1bab768 commit b0da979

File tree

1 file changed

+3
-3
lines changed
  • packages/main/src/components/VariantManagement

1 file changed

+3
-3
lines changed

packages/main/src/components/VariantManagement/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,14 +158,14 @@ export interface VariantManagementPropTypes extends Omit<CommonProps, 'onSelect'
158158
*
159159
* __Note:__ Calling `event.preventDefault()` prevents the dialog from closing when clicked.
160160
*/
161-
onSaveAs?: (e: Parameters<ButtonPropTypes['onClick']>[0] & { detail: SelectedVariant }) => void;
161+
onSaveAs?: (e: Parameters<NonNullable<ButtonPropTypes['onClick']>>[0] & { detail: SelectedVariant }) => void;
162162
/**
163163
* The event is fired when the "Save" button is clicked inside the Manage Views dialog.
164164
*
165165
* __Note:__ Calling `event.preventDefault()` prevents the dialog from closing when clicked.
166166
*/
167167
onSaveManageViews?: (
168-
e: Parameters<ButtonPropTypes['onClick']>[0] & {
168+
e: Parameters<NonNullable<ButtonPropTypes['onClick']>>[0] & {
169169
detail: {
170170
deletedVariants: VariantItemPropTypes[];
171171
prevVariants: VariantItemPropTypes[];
@@ -179,7 +179,7 @@ export interface VariantManagementPropTypes extends Omit<CommonProps, 'onSelect'
179179
*
180180
* __Note:__ The save button is only displayed if the `VariantManagement` is in `dirtyState` and the selected variant is not in `readOnly` mode.
181181
*/
182-
onSave?: (e: Parameters<ButtonPropTypes['onClick']>[0] & { detail: SelectedVariant }) => void;
182+
onSave?: (e: Parameters<NonNullable<ButtonPropTypes['onClick']>>[0] & { detail: SelectedVariant }) => void;
183183
}
184184

185185
const styles = {

0 commit comments

Comments
 (0)