Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
@skava/forms / src / new-forms / OneForm / toFormState.ts
Size: Mime:
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
}