Skip to content

Commit db279c7

Browse files
committed
chore: simplify
1 parent 37473c3 commit db279c7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/machines/navigation-menu/src/navigation-menu.machine.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ export const machine = createMachine({
169169
},
170170
"TRIGGER.LEAVE": {
171171
target: "closed",
172-
actions: ["clearValue", "clearPreviousValue", "clearPointerMoveRef"],
172+
actions: ["clearValue", "clearPointerMoveRef"],
173173
},
174174
"CONTENT.FOCUS": {
175175
actions: ["focusContent", "restoreTabOrder"],
@@ -199,7 +199,7 @@ export const machine = createMachine({
199199
},
200200
"CONTENT.DISMISS": {
201201
target: "closed",
202-
actions: ["focusTriggerIfNeeded", "clearValue", "clearPreviousValue", "clearPointerMoveRef"],
202+
actions: ["focusTriggerIfNeeded", "clearValue", "clearPointerMoveRef"],
203203
},
204204
"CONTENT.ENTER": {
205205
actions: ["restoreTabOrder"],
@@ -225,7 +225,7 @@ export const machine = createMachine({
225225
},
226226
"CONTENT.DISMISS": {
227227
target: "closed",
228-
actions: ["focusTriggerIfNeeded", "clearValue", "clearPreviousValue", "clearPointerMoveRef"],
228+
actions: ["focusTriggerIfNeeded", "clearValue", "clearPointerMoveRef"],
229229
},
230230
"CONTENT.ENTER": {
231231
target: "open",
@@ -398,7 +398,7 @@ export const machine = createMachine({
398398
context.set("previousValue", null)
399399
},
400400
clearValue({ context }) {
401-
context.set("previousValue", context.get("value"))
401+
context.set("previousValue", null)
402402
context.set("value", null)
403403
},
404404
setValue({ context, event }) {

0 commit comments

Comments
 (0)