Adding types for disableCaretPositioning option

This commit is contained in:
Francisco Hodge 2019-01-16 19:38:42 -05:00
parent 23a50e6f44
commit 6c2236f762
9 changed files with 17 additions and 6 deletions

View File

@ -1,6 +1,6 @@
/*!
*
* simple-keyboard v2.13.2
* simple-keyboard v2.13.3
* https://github.com/hodgef/simple-keyboard
*
* Copyright (c) Francisco Hodge (https://github.com/hodgef)

File diff suppressed because one or more lines are too long

5
build/index.d.ts vendored
View File

@ -101,6 +101,11 @@ declare module 'simple-keyboard' {
*/
useButtonTag?: boolean;
/**
* A prop to ensure characters are always be added/removed at the end of the string.
*/
disableCaretPositioning?: boolean;
/**
* Executes the callback function on key press. Returns button layout name (i.e.: "{shift}").
*/

View File

@ -1,6 +1,6 @@
/*!
*
* simple-keyboard v2.13.2
* simple-keyboard v2.13.3
* https://github.com/hodgef/simple-keyboard
*
* Copyright (c) Francisco Hodge (https://github.com/hodgef)

File diff suppressed because one or more lines are too long

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "simple-keyboard",
"version": "2.13.2",
"version": "2.13.3",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@ -1,6 +1,6 @@
{
"name": "simple-keyboard",
"version": "2.13.2",
"version": "2.13.3",
"description": "On-screen Javascript Virtual Keyboard",
"main": "build/index.js",
"types": "build/index.d.ts",

View File

@ -101,6 +101,11 @@ declare module 'simple-keyboard' {
*/
useButtonTag?: boolean;
/**
* A prop to ensure characters are always be added/removed at the end of the string.
*/
disableCaretPositioning?: boolean;
/**
* Executes the callback function on key press. Returns button layout name (i.e.: "{shift}").
*/

View File

@ -59,6 +59,7 @@ class SimpleKeyboard {
* @property {function} onInit Executes the callback function once simple-keyboard is rendered for the first time (on initialization).
* @property {function(inputs: object):object} onChangeAll Executes the callback function on input change. Returns the input object with all defined inputs.
* @property {boolean} useButtonTag Render buttons as a button element instead of a div element.
* @property {boolean} disableCaretPositioning A prop to ensure characters are always be added/removed at the end of the string.
*/
this.options = options;
this.options.layoutName = this.options.layoutName || "default";