New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Form Builder: issue setting initial disabled/hidden state #359

Closed
c-frater opened this Issue Dec 15, 2016 · 0 comments

Comments

Projects
None yet
1 participant
@c-frater
Copy link
Contributor

c-frater commented Dec 15, 2016

Context

When initialising a form using the form builder, setting something like:

{ key: 'someKey', disabled: true }

Expected Behavior

The field should be disabled when it is initialised

Actual Behavior

The disabled and hidden properties are ignored, creating the field as usual

Possible Fix

Update where it uses extras.disabled to detect whether the key or name is being used

Steps to Reproduce

const formSel = hx.detached('form')
const form = new hx.Form(formSel.node())
  .addText('Text', { key: 'someKey', disabled: true })
hx.select('body')
  .clear()
  .add(formSel)

Field is not disabled, however calling form.disabled('someKey', true) correctly disables the field.

@c-frater c-frater changed the title Form Builder: issue setting initial disabled/hidden state Form Builder: issue setting initial disabled/hidden state Jan 4, 2017

@c-frater c-frater added the Bug label Jan 4, 2017

@c-frater c-frater self-assigned this Jan 4, 2017

@c-frater c-frater added the In Progress label Jan 4, 2017

@c-frater c-frater referenced this issue Jan 4, 2017

Merged

#359 form builder disabled/hidden bugfix #365

6 of 6 tasks complete

@c-frater c-frater added In Review and removed In Progress labels Jan 4, 2017

c-frater added a commit that referenced this issue Jan 12, 2017

Merge remote-tracking branch 'github/#359-form-builder-bugfix'
# Conflicts:
#	modules/form-builder/test/spec.coffee

@c-frater c-frater removed the In Review label Jan 12, 2017

c-frater added a commit that referenced this issue Mar 20, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment