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 Name | Data Type | Required | Decription |
---|---|---|---|
inputMdl | any | No | Two way bound variable in which value will be set. |
options | object | No | To give other options with pageLabels and color obj |
otherInfo | any | No | Extra info to be passed on event. |
extDisabled | boolean | No | Disables any functionality on component. |
evtBlurCallback | method | No | Method to be called on blur. |
validateCallback | method | No | Method 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
** 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
IE
Tab
Mobile
Demo Link
Demo
Mark down usage
https://guides.github.com/features/mastering-markdown/
Version | Date | Developed By | Information Class | Reviewed By | Approved By |
---|---|---|---|---|---|
1.0 | 05-11-2019 | Gunjan | INTERNAL | Prasan & Tarun | Prasan |
Confidential Information (Antares Systems Limited). All rights reserved