Skip to content
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

The disable function does not recursively disable descendant forms #155

Open
cimmanon opened this issue Oct 22, 2018 · 0 comments
Open

The disable function does not recursively disable descendant forms #155

cimmanon opened this issue Oct 22, 2018 · 0 comments

Comments

@cimmanon
Copy link
Contributor

While I was poking around with the disable function to see if I could repurpose it to work with Views in order to address #63, I learned three things:

  • It doesn't work on lists at all
  • It only disables fields that are immediate descendants of the form (which explains the previous point)
  • Disabling only works if the field is referenced in a specific way

If you have a form that looks like this:

form
	subView1 (disabled)
		field1
		subView2
			field2
			field3

This template disables field1:

<dfForm>
	<dfSubView ref="subView1">
		<dfInputText ref="field1" />
	</dfSubView>
</dfForm>

This template does not disable field1:

<dfForm>
	<dfInputText ref="subView1.field1" />
</dfForm>

The only way to disable field2 and field3 is to also disable subView2. I don't know if this is intended or not, but it's not how I expected it to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant