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

Value or empty relation assertion hidden field #65

Open
VojtaStanek opened this issue Oct 25, 2021 · 0 comments
Open

Value or empty relation assertion hidden field #65

VojtaStanek opened this issue Oct 25, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@VojtaStanek
Copy link
Contributor

Should be useful when we have DiscriminatedBlocks and use different set of fields in each block and we want to unset fields or relations not used in the block and we want to unset them when we change type.

Illustrative example:

<DiscriminatedBlocks field="type" label="Type" >
    <Block discriminateBy="typeA" label="Type A">
        <SelectField label="Some useful stuff" field="fieldOnTypeA" options="Foo.bar" />
        <AssertNull field="fieldOnTypeB" />
    </Block>
    <Block discriminateBy="typeB" label="Type B">
        <SelectField label="Different stuff" field="fieldOnTypeB" options="Foo.bar" />
        <AssertNull field="fieldOnTypeA" />
    </Block>
</DiscriminatedBlocks>
@VojtaStanek VojtaStanek added the enhancement New feature or request label Jan 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant