Repository URL to install this package:
|
Version:
3.2.1 ▾
|
import { InputState, InputConfig } from '../inputs'
import { FormState } from '../forms'
/**
* @todo here, we check if it is @deprecated
* ^ unless our `attributes` handles that...
* ^ but we want warnings
*/
export function toFormState(list: InputConfig[]) {
const inputList = list.map(InputState.from)
const form = new FormState()
form.setInputsList(inputList)
return form
}