File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
packages/calcite-components/src/components/sort-handle Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -75,8 +75,9 @@ describe("calcite-sort-handle", () => {
75
75
76
76
await page . keyboard . press ( "Enter" ) ;
77
77
await page . waitForChanges ( ) ;
78
- expect ( await calciteSortHandleReorderSpy . lastEvent . detail . reorder ) . toBe ( REORDER_VALUES [ 0 ] ) ;
78
+ expect ( calciteSortHandleReorderSpy . lastEvent . detail . reorder ) . toBe ( REORDER_VALUES [ 0 ] ) ;
79
79
expect ( calciteSortHandleReorderSpy ) . toHaveReceivedEventTimes ( 1 ) ;
80
+ expect ( calciteSortHandleReorderSpy . lastEvent . cancelable ) . toBe ( true ) ;
80
81
} ) ;
81
82
82
83
it ( "fires calciteSortHandleMove event" , async ( ) => {
@@ -104,8 +105,9 @@ describe("calcite-sort-handle", () => {
104
105
105
106
await page . keyboard . press ( " " ) ;
106
107
await page . waitForChanges ( ) ;
107
- expect ( await calciteSortHandleMoveSpy . lastEvent . detail . moveTo . id ) . toBe ( moveToItems [ 1 ] . id ) ;
108
+ expect ( calciteSortHandleMoveSpy . lastEvent . detail . moveTo . id ) . toBe ( moveToItems [ 1 ] . id ) ;
108
109
expect ( calciteSortHandleMoveSpy ) . toHaveReceivedEventTimes ( 1 ) ;
110
+ expect ( calciteSortHandleMoveSpy . lastEvent . cancelable ) . toBe ( true ) ;
109
111
} ) ;
110
112
111
113
it ( "is disabled when no moveToItems, setPosition < 1 or setSize < 2" , async ( ) => {
Original file line number Diff line number Diff line change @@ -136,13 +136,13 @@ export class SortHandle extends LitElement implements InteractiveComponent {
136
136
calciteSortHandleClose = createEvent ( { cancelable : false } ) ;
137
137
138
138
/** Fires when a move item has been selected. */
139
- calciteSortHandleMove = createEvent < MoveEventDetail > ( { cancelable : false } ) ;
139
+ calciteSortHandleMove = createEvent < MoveEventDetail > ( { cancelable : true } ) ;
140
140
141
141
/** Fires when the component is open and animation is complete. */
142
142
calciteSortHandleOpen = createEvent ( { cancelable : false } ) ;
143
143
144
144
/** Fires when a reorder has been selected. */
145
- calciteSortHandleReorder = createEvent < ReorderEventDetail > ( { cancelable : false } ) ;
145
+ calciteSortHandleReorder = createEvent < ReorderEventDetail > ( { cancelable : true } ) ;
146
146
147
147
// #endregion
148
148
You can’t perform that action at this time.
0 commit comments