Multi Line Textbox

  • Shows multi line textbox

Features/Functionality

  • Shows editable div of min-width: '100px',width as parent min-height: 40px.
  • Minimum height of textbox is '25px'.Height will be auto increased based on content.
  • Value will be set on blur in inputMdl variable passed.
  • Disabled textbox is shown if disable is true.
  • Blur callback will called on blur.
  • Placeholder is given in textbox. It can be overridden, by overriding 'placeHolder' variable in pageLabels.
  • Component is container responsive.
  • It is cross browser compatible. (IE11, Edge, Firefox, chrome).

Note Do not fix the height of parent div. In that case use textarea component.

Basic Usage

Dependencies

  • jquery
  • shared styles
  • shared scripts

HTML Structure

<require from="{user_path}/multi_line_textboxes/multi_line_textbox"></require>
<cst-multi-line-textbox input-mdl.bind="{inputMdl}" options.bind="{options}" other-info.bind="{otherInfo}" ext-disabled.bind="{disabled}" evt-blur-callback.bind="{evtBlurCallback}" validate-callback.bind="{validateCallback}"></cst-multi-line-textbox>

Bindable Properties

Property NameData TypeRequiredDecription
inputMdlanyNoTwo way bound variable in which value will be set.
optionsobjectNoTo give other options with pageLabels and color obj
otherInfoanyNoExtra info to be passed on event.
extDisabledbooleanNoDisables any functionality on component.
evtBlurCallbackmethodNoMethod to be called on blur.
validateCallbackmethodNoMethod called for validations.

Structure of bindable properties

inputMdl

inputMdl = '' // On pageload default textbox value and will return textbox value

options

options = {
pageLabel: {}, // Override page labels
pageColorData: {} // Override css colour porperty
}

evtBlurCallback

evtBlurCallback(_event,_info);
_info = {
overrideContext: overrideContext,
otherInfo: otherInfo,
value: item
}

CSS Overrinding

  • Following classes are given to override CSS:
    • .cst-multi-line-textbox-container-override : Container Class
    • .cst-multi-line-textbox-element-override: Element Class

Note

  • While giving the classes in page, give them in nested structure.

Rules

Component measurements

Image of measurements

** box-sizing: border-box is used. So width and height will be dimensions + padding.

Working Example

HTML

<template>
<require from="./shared/core_comp/multi_line_textboxes/multi_line_textbox"></require>
<div>
<cst-multi-line-textbox input-mdl.bind="inputMdl" options.bind="options" other-info.bind="otherInfo" ext-disabled.bind="disabled" evt-blur-callback.bind="evtBlurCallback" validate-callback.bind="validateCallback"></cst-multi-line-textbox>
</div>
</template>

CSS

.cst-ex-multi-line-textbox {
.cst-multi-line-textbox-element-override {
border: 4px solid #ffffff !important;
}
}

JS

class MyCls{
constructor(){
this.inputMdl = 'Enter text';
this.otherInfo = '';
this.disabled = false;
}
evtBlurCallback(_event, _info) {
}
}
export { MyCls }

Example Screen Shots

Desktop

Image of Ex


IE

Image of Ex


Tab

Image of Ex


Mobile

Image of Ex


Demo Link
Demo


Mark down usage
https://guides.github.com/features/mastering-markdown/

VersionDateDeveloped ByInformation ClassReviewed ByApproved By
1.005-11-2019GunjanINTERNALPrasan & TarunPrasan

Confidential Information (Antares Systems Limited). All rights reserved