Close export dialog autmatically for support form
Summary: This diff adds the support to close the dialog automatically for the support form. Reviewed By: passy Differential Revision: D17899862 fbshipit-source-id: 9d9cd14556a4cebe60f8cc1d082be3e439998e9c
This commit is contained in:
committed by
Facebook Github Bot
parent
4a8a4aabb6
commit
de17f3905b
@@ -63,6 +63,7 @@ type SubShareType =
|
||||
|
||||
export type ShareType = {
|
||||
statusComponent?: React.ReactNode;
|
||||
closeOnFinish: boolean;
|
||||
} & SubShareType;
|
||||
|
||||
export type State = {
|
||||
@@ -99,7 +100,7 @@ export type Action =
|
||||
}
|
||||
| {
|
||||
type: typeof ACTIVE_SHEET_SHARE_DATA_IN_FILE;
|
||||
payload: {file: string};
|
||||
payload: {file: string; closeOnFinish: boolean};
|
||||
}
|
||||
| {
|
||||
type: typeof ACTIVE_SHEET_SELECT_PLUGINS_TO_EXPORT;
|
||||
@@ -219,7 +220,11 @@ export default function reducer(
|
||||
return {
|
||||
...state,
|
||||
activeSheet: ACTIVE_SHEET_SHARE_DATA_IN_FILE,
|
||||
share: {type: 'file', file: action.payload.file},
|
||||
share: {
|
||||
type: 'file',
|
||||
file: action.payload.file,
|
||||
closeOnFinish: action.payload.closeOnFinish,
|
||||
},
|
||||
};
|
||||
} else if (action.type === ACTIVE_SHEET_SELECT_PLUGINS_TO_EXPORT) {
|
||||
return {
|
||||
@@ -311,9 +316,12 @@ export const setSelectPluginsToExportActiveSheet = (
|
||||
payload,
|
||||
});
|
||||
|
||||
export const setExportDataToFileActiveSheet = (file: string): Action => ({
|
||||
export const setExportDataToFileActiveSheet = (payload: {
|
||||
file: string;
|
||||
closeOnFinish: boolean;
|
||||
}): Action => ({
|
||||
type: ACTIVE_SHEET_SHARE_DATA_IN_FILE,
|
||||
payload: {file},
|
||||
payload: payload,
|
||||
});
|
||||
|
||||
export const setActiveSheet = (payload: ActiveSheet): Action => ({
|
||||
|
||||
Reference in New Issue
Block a user