Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

🔹 Description

To follow

🔹System Dependencies

🔹 Installation

The package can be installed via npm:

npm install empower-inputs --save

🔹 Standard Select

Configuration

import { InputSelectionHandler} from 'empower-inputs';

let [formElement, setFormElement] = useState({
  sampleSelect: {
      id: 'sampleSelect',
      type: 'select',
      placeholder: 'Please select option',
      value: '',
      disabled: false,
      required: true,
      options: [
          {
            label: "Leave",
            value: "file-leave",       
          },
          {
            label: "Overtime",
            value: "file-overtime",       
          },
          {
            label: "DTR Amendment",
            value: "file-amendment",        
          },
          {
            label: "Change Shift",
            value: "view-shift-schedule",     
          }
        ]
    }
});
..............

return (
    <>
       <h4>SELECT</h4>
      <InputSelectionHandler
        config={formElement.sampleSelect}
        customClass="select-custom-class"
        onChanged={(e) => inputChangedHandler(e, 'sampleSelect')}
      />
    </>
  )

🔹  Properties

Parent Parameter

Sub Parameter

Data Type

Constraint

config

JSON Object

Required

id

String

Required

type

String

Required

label

String

Optional

value

String

Required

placeholder

String

Optional

maxLength

Integer

Optional

readOnly

Boolean

Optional

required

Boolean

Optional

rows

Boolean

Required

cols

Boolean

Required

allowedChar

JSON Object

Optional

alphabet

Boolean

Optional

numeric

Boolean

Optional

space

Boolean

Optional

allowedSymbols

Array (String)

Optional

customClass

String

Optional

onChanged

Event Method

Required

🔹 References

Repository Link: https://gitlab.com/empowerteams/empower-inputs.git

NPM Package: npm: empower-inputs

Demo Repo: git@bitbucket.org:empowerteams/mfe-sub-application-template.git

  • No labels