Pin selected after edit

This commit is contained in:
adilallo
2026-04-29 19:39:08 -06:00
parent a4f0c4bf27
commit 7fde82a94c
6 changed files with 147 additions and 65 deletions
@@ -0,0 +1,22 @@
import type { CreateFlowState } from "../../app/(app)/create/types";
/**
* Same field removal as {@link resetCustomRuleSelections} in CreateFlowProvider.
* Used to apply template "Use without changes" in one atomic replaceState updater.
*/
export function stripCustomRuleSelectionFields(
prev: CreateFlowState,
): CreateFlowState {
const {
selectedCoreValueIds: _a,
coreValuesChipsSnapshot: _b,
coreValueDetailsByChipId: _c,
selectedCommunicationMethodIds: _d,
selectedMembershipMethodIds: _e,
selectedDecisionApproachIds: _f,
selectedConflictManagementIds: _g,
methodSectionsPinCommitted: _h,
...rest
} = prev;
return rest;
}