Interface FormRenderer<A>

Type Parameters

  • A

Hierarchy

  • FormRenderer

Properties

Combine: ((a, b) => A)

Type declaration

    • (a, b): A
    • Used for combining elements required for Form input, e.g. returning a fragment with the two as sibling elements

      Parameters

      • a: A
      • b: A

      Returns A

Disable: ((hide, form) => A)

Type declaration

    • (hide, form): A
    • Parameters

      • hide: Accessor<boolean>

        Reactive Accessor signaling if the element should be shown or not

      • form: A

      Returns A

Errors: ((errors, children?) => A)

Type declaration

    • (errors, children?): A
    • Parameters

      • errors: Accessor<string[]>
      • Optional children: Element

      Returns A

Field: ((name, type, errors, field) => A)

Type declaration

    • (name, type, errors, field): A
    • Parameters

      • name: string
      • type: string
      • errors: Accessor<string[]>

        Reactive Accessor for validation errors for the field

      • field: ((forwardProps) => A)

        Render function for Field, takes optional props to forward

          • (forwardProps): A
          • Render function for Field, takes optional props to forward

            Parameters

            • forwardProps: {
                  input?: Partial<InputHTMLAttributes<HTMLInputElement>>;
                  select?: Partial<SelectHTMLAttributes<HTMLSelectElement>>;
                  textarea?: Partial<TextareaHTMLAttributes<HTMLTextAreaElement>>;
              }
              • Optional input?: Partial<InputHTMLAttributes<HTMLInputElement>>
              • Optional select?: Partial<SelectHTMLAttributes<HTMLSelectElement>>
              • Optional textarea?: Partial<TextareaHTMLAttributes<HTMLTextAreaElement>>

            Returns A

      Returns A

Group: ((name, form) => A)

Type declaration

    • (name, form): A
    • Parameters

      • name: string
      • form: A

      Returns A

List: ((listRenderer) => A)

Type declaration

    • (listRenderer): A
    • Parameters

      • listRenderer: ((withDelete, withAdd) => A)

        Used for adding add and delete functionality to components being rendered in a list

          • (withDelete, withAdd): A
          • Used for adding add and delete functionality to components being rendered in a list

            Parameters

            • withDelete: ((del, form) => A)

              Wrapper function for adding "delete" functionality around list item

              Param

              Callback which when called will delete list item from list

                • (del, form): A
                • Wrapper function for adding "delete" functionality around list item

                  Parameters

                  • del: (() => void)

                    Callback which when called will delete list item from list

                      • (): void
                      • Returns void

                  • form: A

                  Returns A

            • withAdd: ((add, forms) => A)

              Wrapper function for adding "add" functionality around list

              Param

              Callback which when called will append a new list item

                • (add, forms): A
                • Wrapper function for adding "add" functionality around list

                  Parameters

                  • add: (() => void)

                    Callback which when called will append a new list item

                      • (): void
                      • Returns void

                  • forms: A

                  Returns A

            Returns A

      Returns A

Generated using TypeDoc