Skip to content

Commit 62068df

Browse files
committed
version up
1 parent 4b7ba2c commit 62068df

File tree

3 files changed

+16
-4
lines changed

3 files changed

+16
-4
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@revolist/svelte-datagrid",
33
"description": "Svelte data grid spreadsheet",
4-
"version": "1.0.3",
4+
"version": "1.0.4",
55
"main": "dist/revogrid.js",
66
"scripts": {
77
"build": "tsc",
@@ -44,6 +44,6 @@
4444
"webpack-dev-server": "^3.11.2"
4545
},
4646
"dependencies": {
47-
"@revolist/revogrid": "^2.9.4"
47+
"@revolist/revogrid": "^2.9.5"
4848
}
4949
}

src/components/RevoGrid.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ interface RevoGridEvents {
9999

100100
/** Before edit event.
101101
Triggered before edit data applied.
102-
Use e.preventDefault() to prevent edit data set and use you own.
102+
Use e.preventDefault() to prevent edit data set and use you own.
103103
Use e.val = {your value} to replace edit result with your own. */
104104
beforeEdit: Parameters<JSX.RevoGrid["onBeforeEdit"]>[0]
105105

@@ -141,7 +141,7 @@ Use e.preventDefault() to prevent sorting. */
141141
beforeSorting: Parameters<JSX.RevoGrid["onBeforeSorting"]>[0]
142142

143143
/** Row order change started.
144-
Use e.preventDefault() to prevent row order change.
144+
Use e.preventDefault() to prevent row order change.
145145
Use e.text = 'new name' to change item name on start. */
146146
rowDragStart: Parameters<JSX.RevoGrid["onRowDragStart"]>[0]
147147

@@ -176,6 +176,14 @@ Update @collection if you wish to change filters
176176
Update @itemsToFilter if you wish to filter indexes of trimming */
177177
beforeFilterTrimmed: Parameters<JSX.RevoGrid["onBeforeFilterTrimmed"]>[0]
178178

179+
/** Before trimmed values
180+
Use e.preventDefault() to prevent value trimming
181+
Update @trimmed if you wish to filter indexes of trimming */
182+
beforeTrimmed: Parameters<JSX.RevoGrid["onBeforeTrimmed"]>[0]
183+
184+
/** Notify trimmed applied */
185+
afterTrimmed: Parameters<JSX.RevoGrid["onAfterTrimmed"]>[0]
186+
179187
/** Triggered when view port scrolled */
180188
viewportScroll: Parameters<JSX.RevoGrid["onViewportScroll"]>[0]
181189

@@ -269,6 +277,8 @@ function create_fragment(ctx) {
269277
listen(revo_grid, "afterColumnsSet", /*onEvent*/ ctx[14]),
270278
listen(revo_grid, "beforeFilterApply", /*onEvent*/ ctx[14]),
271279
listen(revo_grid, "beforeFilterTrimmed", /*onEvent*/ ctx[14]),
280+
listen(revo_grid, "beforeTrimmed", /*onEvent*/ ctx[14]),
281+
listen(revo_grid, "afterTrimmed", /*onEvent*/ ctx[14]),
272282
listen(revo_grid, "viewportScroll", /*onEvent*/ ctx[14]),
273283
listen(revo_grid, "beforeExport", /*onEvent*/ ctx[14]),
274284
listen(revo_grid, "beforeEditStart", /*onEvent*/ ctx[14])

src/svelte/RevoGrid.svelte

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ const onEvent = (e) => {
104104
on:afterColumnsSet={onEvent}
105105
on:beforeFilterApply={onEvent}
106106
on:beforeFilterTrimmed={onEvent}
107+
on:beforeTrimmed={onEvent}
108+
on:afterTrimmed={onEvent}
107109
on:viewportScroll={onEvent}
108110
on:beforeExport={onEvent}
109111
on:beforeEditStart={onEvent}

0 commit comments

Comments
 (0)