Skip to content

Commit

Permalink
fix the type of input from fun or onEdit to `HTMLInputElement|H…
Browse files Browse the repository at this point in the history
…TMLSelectElement`
  • Loading branch information
NicolasCARPi committed Nov 18, 2023
1 parent 9ae59c1 commit 152c1bf
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog for malle

## 2.5.1

* Fix the type of `input` from `fun` or `onEdit` to `HTMLInputElement|HTMLSelectElement`

## 2.5.0

* Create a new instance of Malle for each element (PR #8). This allows opening multiple inputs at the same time. fix #4
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@deltablot/malle",
"version": "2.5.0",
"version": "2.5.1",
"description": "Make text elements malleable, without dependencies.",
"main": "dist/main.js",
"typings": "dist/main.d.ts",
Expand Down
4 changes: 2 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ export interface Options {
event?: EventType;
inputType?: InputType;
focus?: boolean;
fun(value: string, original: HTMLElement, event:Event, input: HTMLInputElement): Promise<string>;
fun(value: string, original: HTMLElement, event:Event, input: HTMLInputElement|HTMLSelectElement): Promise<string>;
listenNow?: boolean;
listenOn?: string;
onBlur?: Action;
onEdit?(original: HTMLElement, event:Event, input: HTMLInputElement): boolean;
onEdit?(original: HTMLElement, event:Event, input: HTMLInputElement|HTMLSelectElement): boolean;
onEnter?: Action;
onEscape?: Action;
placeholder?: string;
Expand Down

0 comments on commit 152c1bf

Please sign in to comment.