@schemater/ngx-bootstrap
v0.2.3
Published
Collection of field's types for `@schemater/core` build on base of `ngx-bootstrap`
Downloads
12
Readme
Collection of field's types for @schemater/core
build on base of ngx-bootstrap
Input types
You can use input fields passing only type Input
and ngModel
(validation feedback is not working then)
<schemater-input-field type="text" [(ngModel)]="model"></schemater-input-field>
You can use alsoo use it with parent FormGroup
(validation feedback is working).
You can provide field: SchematerFieldConfig
when field.id
is formControlName
or provide formControlName
<form [formGroup]="formGroup">
<schemater-input-field type="text" formControlName="text"></schemater-input-field>
<schemater-input-field [field]="{id: 'text', inputType: 'text', config: {placeholder: 'Placeholder for text'}}"></schemater-input-field>
</form>
text InputTextComponent
Config options:
placeholder: string
- placeholder for input
checkbox InputCheckboxComponent
select InputSelectComponent
Config options:
options: {id:string|int, text:string}[]
- options as array of 'id', 'text' object
textarea InputTextareaComponent
Config options:
placeholder: string
- placeholder for inputrows: number
- number of rows
password InputPasswordComponent
hidden InputHiddenComponent
int InputIntComponent
float InputFloatComponent
email InputEmailComponent
toggle InputToggleComponent
radio-button InputRadioComponent
- dependent on NgxBootstrap
Config options:
options: {id:string|int, text:string, btnClass?: string}[]
- available optionsbtnClass: string
- class of btn. Default:btn-outline-secondary
date InputDateComponent
- dependent on NgxBootstrap
Config options:
placeholder: string
- placeholder for input
datetime InputDatetimeComponent
Config options:
placeholder: string
- placeholder for input
array InputArrayComponent
Config options:
field: SchematerFieldConfig
- definition of field required
fields-array InputFieldsArrayComponent
Config options:
fields: SchematerFieldConfig[]
- table of fields required
complex-select InputComplexSelectComponent
- select box build on ng-select
Config options:
options: {id:string|int, text:string}[]
- options as array of 'id', 'text' objectmultiple: boolean
- can be multipleappendTo: string
- css selector of element which dropdown will be appended to. Body should haveposition: relative
style