@syncfusion/ej2-inputs
Advanced tools
Comparing version 16.1.28 to 16.1.29
@@ -5,2 +5,10 @@ # Changelog | ||
### Input | ||
#### Features | ||
- The clear button can be enabled/disabled dynamically through `setClearButton` method. | ||
## 16.1.28-preview (2018-03-09) | ||
### NumericTextBox | ||
@@ -7,0 +15,0 @@ |
/*! | ||
* filename: index.d.ts | ||
* version : 16.1.26 | ||
* version : 16.1.28 | ||
* Copyright Syncfusion Inc. 2001 - 2017. All rights reserved. | ||
@@ -5,0 +5,0 @@ * Use of this code is subject to the terms of our license. |
{ | ||
"name": "@syncfusion/ej2-inputs", | ||
"version": "16.1.28", | ||
"version": "16.1.29", | ||
"description": "Essential JS 2 Input Components", | ||
@@ -11,5 +11,5 @@ "author": "Syncfusion Inc.", | ||
"dependencies": { | ||
"@syncfusion/ej2-base": "~16.1.28", | ||
"@syncfusion/ej2-base": "~16.1.29", | ||
"@syncfusion/ej2-buttons": "~16.1.28", | ||
"@syncfusion/ej2-popups": "~16.1.28" | ||
"@syncfusion/ej2-popups": "~16.1.29" | ||
}, | ||
@@ -16,0 +16,0 @@ "devDependencies": { |
@@ -80,2 +80,3 @@ /** | ||
function setEnabled(isEnable: boolean, element: HTMLInputElement, floatLabelType?: string): void; | ||
function setClearButton(isClear: boolean, element: HTMLInputElement, inputObject: InputObject, initial?: boolean): void; | ||
/** | ||
@@ -82,0 +83,0 @@ * Removing the multiple attributes from the given element such as "disabled","id" , etc. |
@@ -61,3 +61,3 @@ define(["require", "exports", "@syncfusion/ej2-base"], function (require, exports, ej2_base_1) { | ||
if (!ej2_base_1.isNullOrUndefined(args.properties) && !ej2_base_1.isNullOrUndefined(args.properties.showClearButton) && args.properties.showClearButton) { | ||
inputObject.clearButton = createClearButton(args.element, inputObject.container); | ||
setClearButton(args.properties.showClearButton, args.element, inputObject, true); | ||
if (inputObject.container.classList.contains(CLASSNAMES.FLOATINPUT)) { | ||
@@ -209,5 +209,13 @@ ej2_base_1.addClass([inputObject.container], CLASSNAMES.INPUTGROUP); | ||
*/ | ||
function createClearButton(element, container) { | ||
function createClearButton(element, inputObject, initial) { | ||
var button = ej2_base_1.createElement('span', { className: CLASSNAMES.CLEARICON }); | ||
container.appendChild(button); | ||
var container = inputObject.container; | ||
if (!ej2_base_1.isNullOrUndefined(initial)) { | ||
container.appendChild(button); | ||
} | ||
else { | ||
var baseElement = inputObject.container.classList.contains(CLASSNAMES.FLOATINPUT) ? | ||
inputObject.container.querySelector('.' + CLASSNAMES.FLOATTEXT) : element; | ||
baseElement.insertAdjacentElement('afterend', button); | ||
} | ||
if (!ej2_base_1.isNullOrUndefined(container) && | ||
@@ -407,2 +415,12 @@ container.classList.contains(CLASSNAMES.FLOATINPUT)) { | ||
Input.setEnabled = setEnabled; | ||
function setClearButton(isClear, element, inputObject, initial) { | ||
if (isClear) { | ||
inputObject.clearButton = createClearButton(element, inputObject, initial); | ||
} | ||
else { | ||
inputObject.clearButton.remove(); | ||
inputObject.clearButton = null; | ||
} | ||
} | ||
Input.setClearButton = setClearButton; | ||
/** | ||
@@ -409,0 +427,0 @@ * Removing the multiple attributes from the given element such as "disabled","id" , etc. |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
13302889
118780