File tree Expand file tree Collapse file tree 5 files changed +10
-2
lines changed
Expand file tree Collapse file tree 5 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 33 "author" : " HC200ok" ,
44 "description" : " A customizable and easy-to-use data table component made with Vue.js 3.x." ,
55 "private" : false ,
6- "version" : " 1.5.18 " ,
6+ "version" : " 1.5.20 " ,
77 "types" : " ./types/main.d.ts" ,
88 "license" : " MIT" ,
99 "files" : [
Original file line number Diff line number Diff line change @@ -382,6 +382,7 @@ onMounted(() => {
382382const emits = defineEmits ([
383383 ' clickRow' ,
384384 ' selectRow' ,
385+ ' deselectRow' ,
385386 ' expandRow' ,
386387 ' updateSort' ,
387388 ' updateFilter' ,
Original file line number Diff line number Diff line change @@ -151,6 +151,7 @@ export default function useTotalItems(
151151 } else {
152152 selectItemsComputed . value = selectItemsComputed . value . filter ( ( selectedItem ) => JSON . stringify ( selectedItem )
153153 !== JSON . stringify ( item ) ) ;
154+ emits ( 'deselectRow' , item ) ;
154155 }
155156 } ;
156157
Original file line number Diff line number Diff line change 4141 :filter-options =" filterOptions"
4242 click-event-type =" double"
4343 @select-row =" showItem"
44+ @deselect-row =" deselectRow"
4445 >
4546 <template #expand =" item " >
4647 <div style =" padding : 15px " >
@@ -210,6 +211,11 @@ const showItem = (item: ClickRowArgument) => {
210211 console .log (JSON .stringify (item ));
211212};
212213
214+ const deselectRow = (item : ClickRowArgument ) => {
215+ console .log (' deselectRow' );
216+ console .log (JSON .stringify (item ));
217+ };
218+
213219const updateSort = (sortOption : UpdateSortArgument ) => {
214220 console .log (sortOption );
215221};
Original file line number Diff line number Diff line change @@ -26,4 +26,4 @@ export type ClickEventType = 'single' | 'double'
2626export type MultipleSelectStatus = 'allSelected' | 'noneSelected' | 'partSelected'
2727
2828// eslint-disable-next-line max-len
29- export type EmitsEventName = 'clickRow' | 'selectRow' | 'expandRow' | 'updateSort' | 'update:itemsSelected' | 'update:serverOptions' | 'updateFilter'
29+ export type EmitsEventName = 'clickRow' | 'selectRow' | 'deselectRow' | ' expandRow' | 'updateSort' | 'update:itemsSelected' | 'update:serverOptions' | 'updateFilter'
You can’t perform that action at this time.
0 commit comments