1. Components
  2. Select

Components

Select

Example
const fields: IField[] = [
	{
		type: 'select', // required
		name: 'name-field-select', // required
		attributes: {
			id: 'id-field-select', // required
			classes: ['form-control'], // optional
			label: 'Label field select 1', // optional
			disabled: false // optional
		},
		extra: {
			options: [
				// required
				{
					value: 1,
					title: 'option 1'
				},
				{
					value: 2,
					title: 'option 2'
				}
			]
		}
	},
	{
		type: 'select', // required
		name: 'name-field-select2', // required
		attributes: {
			id: 'id-field-select2', // required
			classes: ['form-control'], // optional
			label: 'Label field select 2', // optional
			disabled: true // optional
		},
		extra: {
			options: [
				// required
				{
					value: 1,
					title: 'option 3'
				},
				{
					value: 2,
					title: 'option 4'
				}
			]
		}
	}
];
Result