ForgeComponents
en

Components

j-StatusInput

jComponent 20 · jcomponent@20 component Example loaded with jComponent 20
  • supports Dark mode
  • singleton

Usage

var opt = {};

// opt.placeholder {String}  : A placeholder and can be HTML (optional)
// opt.icon {String}         : An icon (optional)
// opt.hide {Function}       : Is executed when the StatusInput is hiding (optional)
// opt.validate {RegExp}     : A validator, must be RegExp or nullable (optional)
// opt.valuel {String}       : A default value for the input (optional)
// opt.callback {Function}   : A callback

opt.callback = function(newvalue) {
	console.log(newvalue);
};

SETTER('statusinput/show', opt);

Use it with <ui-component name="statusinput">. When the component is not loaded yet, jComponent downloads it on first use from the address in DEF.fallback (the Componentator CDN by default). Author: Peter Širka. Source: the Componentator components repository, MIT license.

example.html
<ui-component name="statusinput"></ui-component>

<script>
	setTimeout(function() {
		var opt = {};
		opt.callback = function(val) {
			console.log('callback', val);
		};
		opt.placeholder = 'Type a new name';
		SETTER('statusinput/show', opt);
	}, 500);
</script>