Skip to content

add :init param to INPUT, SELECT and TEXTAREA tags #112

Closed

Description

@catmando

internally will change to defaultValue or defaultChecked

          INPUT(type: :checkbox, init: true)
          INPUT(type: :radio, init: true)
          INPUT(type: :radio, init: false)
          SELECT(init: 'some value') do ...
          INPUT(type: :text, init: 'some value') 
          INPUT(init: 'some value') # same as type: :text
          TEXTAREA(init: 'some value')

Together with #111 this makes uncontrolled inputs quite a bit more succinct:

    name = INPUT(type: :text, init: some_model_for_example.name)
    BUTTON { 'save' }.on(:click) { some_model_for_example.update name: jq[name].value }

Activity

  1. added a commit that references this issue on Jan 26, 2019
  2. added this to the alpha1.4 milestone on Jan 26, 2019
  3. Tim-Blokdijk commented on Apr 14, 2019

    @Tim-Blokdijk
    Contributor

    Seems to work!
    https://hyperstack.org/edge/docs/tutorials/todo still documents the defaultValue way of doing it.

  4. modified the milestones: alpha1.4, alpha1.5 on Apr 18, 2019
  5. added
    ready-to-releaseInternal Use Only: Has been fixed, specs passing and pushed to edge branch
    on Apr 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestready-to-releaseInternal Use Only: Has been fixed, specs passing and pushed to edge branch

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions