Skip to content

Commit

Permalink
TMP
Browse files Browse the repository at this point in the history
  • Loading branch information
linuspahl committed Nov 21, 2024
1 parent 0ed2934 commit 5b8827b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const EditWidgetFrame = ({ children, onCancel, onSubmit, displaySubmitActions =
}

return (
<WidgetEditApplyAllChangesProvider widget={widget} onChange={onChange}>
<WidgetEditApplyAllChangesProvider widget={widget}>
<DisableSubmissionStateProvider>
<Container>
{(showQueryControls && !widget.returnsAllRecords) && (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ import useViewType from 'views/hooks/useViewType';
import View from 'views/logic/views/View';
import IfDashboard from 'views/components/dashboard/IfDashboard';
import FullSizeContainer from 'views/components/aggregationbuilder/FullSizeContainer';
import type WidgetType from 'views/logic/widgets/Widget';

import WidgetFrame from './WidgetFrame';
import WidgetHeader from './WidgetHeader';
Expand Down Expand Up @@ -173,11 +174,16 @@ export const EditWrapper = ({
}: EditWrapperProps) => {
const EditComponent = useMemo(() => _editComponentForType(type), [type]);
const hasOwnSubmitButton = _hasOwnEditSubmitButton(type);
const _onWidgetConfigChange = useCallback((_widgetId: string, widget: WidgetType) => {
onWidgetConfigChange(widget.config);

return Promise.resolve();
}, [onWidgetConfigChange]);

return editing ? (
<EditWidgetFrame onSubmit={onToggleEdit}
onCancel={onCancelEdit}
onChange={onWidgetConfigChange}
onChange={_onWidgetConfigChange}
displaySubmitActions={!hasOwnSubmitButton}
showQueryControls={showQueryControls}>
<EditComponent config={config}
Expand Down

0 comments on commit 5b8827b

Please sign in to comment.