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

disableInvalidSubmit property not working as expected #114

Closed
bro840 opened this issue May 8, 2019 · 1 comment
Closed

disableInvalidSubmit property not working as expected #114

bro840 opened this issue May 8, 2019 · 1 comment

Comments

@bro840
Copy link

bro840 commented May 8, 2019

  • [* ] MaterialDesignFrameworkModule — Material Design
  • [*] Bootstrap3FrameworkModule — Bootstrap 3
  • [*] Bootstrap4FrameworkModule — Bootstrap 4
  • [*] NoFrameworkModule — plain HTML

The disableInvalidSubmit=true property of the the options object does not work as expected when the submit button is override through the layout object

To Reproduce

Just create a simple form from a json schema and override the submit button

<json-schema-form [schema]="anySchema" [framework]="'my-framework'" [(data)]="anyData" [layout]="layout"></json-schema-form>

 layout = [
        '*',
        {
            type: 'submit',
            title: 'Create',
            onClick: () => this.http.post<any>(this.endPoint, this.jsonData).subscribe(
                resp => {
                    ...
                }, error => {
                    ...
                })
        }
    ]

Expected behavior
If the form is in invalid state the submit button should be disabled

@github-actions
Copy link

github-actions bot commented Apr 1, 2020

Stale issue

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

No branches or pull requests

1 participant