UNPKG

@tomino/dynamic-form-semantic-ui

Version:

Semantic UI form renderer based on dynamic form generation

12 lines (10 loc) 349 B
import { FormElement } from '@tomino/dynamic-form'; export const Cache = { _cachedProps: {} as { [index: string]: string[] }, cachedPropNames(element: FormElement) { if (!this._cachedProps[element.control]) { this._cachedProps[element.control] = Object.keys(element.props); } return this._cachedProps[element.control]; } };