0.1.3 • Published 2 years ago

button-input-field v0.1.3

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

Button Input Field

This is an anglar component (module) that has a style and feel of a button. Hover hilights the button and you must click to edit and enter the input state. Once completed the user may choose to tab (blur), click the checkmark (icon) or press return to exit the editable state.

This is a formControl and can easily be added to a formgroup the typical way. There are also event (change) you can register actions.

Intsallation

npm install button-input-field

Then import the module ButtonInputFieldModule

and add the component

<wav-button-input-field></wav-button-input-field>

Inputs

The following Inputs are available

InputTypeDefautDescription
labelSTRINGNULLlabel for input
placeholderSTRINGNULLplaceholder for input
copypasteBOOLEANFASLEbutton for copy contents
readonlyBOOLEANFASLEread only
disabledBOOLEANFASLEdisable input

Output

The following Inputs are available

OutputTypeDescription
changedSTRINGevent emitter on change

FormControl

The component is a formControl and accepts all events types

Options

<wav-button-input-field
  label="Service full name description"
  placeholder="Local-Pro Transact"
  formControlName="application"
  (changed)="onUpdateBasicInfo()"
></wav-button-input-field>

Sample Implementation

selection: formGroup

constructor(
  private fb: FormBuilder
  ) {}

ngOnInit() {

  selection = this.fb.group({
    country: [null]
  })

  this.selection.patchValue({ country: 'Canada'})
  this.selection.valueChanges.subscribe(data => console.log(data))

  }
0.1.3

2 years ago

0.1.2

2 years ago

0.1.0

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago