question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ui:submitButtonOptions don't work.

See original GitHub issue

Prerequisites

Description

None of the ui:submitButtonOptions work on @rjsf/material-ui@4.1.1 or @rjsf/core@4.1.1

Steps to Reproduce

  1. Check out this codebase https://github.com/dwjohnston/rjsf-bug
  2. yarn && yarn start
  3. Note that the submit button is not customised.

Code for quick reference:


function App() {
  return (
    <div className="App">

      <Form
        uiSchema={{
          "ui:submitButtonOptions": {
            "submitText": "Confirm Details",
            "norender": false,
            "props": {
              "disabled": false,
              "className": "btn btn-info"
            }
          },
          "firstName": {
            "ui:autofocus": true,
            "ui:emptyValue": "",
            "ui:autocomplete": "family-name"
          },
          "lastName": {
            "ui:title": "Surname",
            "ui:emptyValue": "",
            "ui:autocomplete": "given-name"
          },
          "age": {
            "ui:widget": "updown",
            "ui:title": "Age of person",
            "ui:description": "(earthian year)"
          },
          "bio": {
            "ui:widget": "textarea"
          },
          "password": {
            "ui:widget": "password",
            "ui:help": "Hint: Make it strong!"
          },
          "date": {
            "ui:widget": "alt-datetime"
          },
          "telephone": {
            "ui:options": {
              "inputType": "tel"
            }
          }
        }}
        schema={{
          "title": "A registration form",
          "description": "A simple form example. Demonstrating ui options",
          "type": "object",
          "required": [
            "firstName",
            "lastName"
          ],
          "properties": {
            "firstName": {
              "type": "string",
              "title": "First name",
              "default": "Chuck"
            },
            "lastName": {
              "type": "string",
              "title": "Last name"
            },
            "telephone": {
              "type": "string",
              "title": "Telephone",
              "minLength": 10
            }
          }
        }}
      />


    </div>
  );
}

Expected behavior

The submit button should be customised as per the documentation and sandbox example.

Curiously enough, this issue is not present on the sandboxes.

Actual behavior

None of the submitButtonOptions appear to work.

Version

4.1.1

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:12 (11 by maintainers)

github_iconTop GitHub Comments

2reactions
dwjohnstoncommented, Apr 26, 2022

I’m wondering if the package simply hasn’t been published since this feature was added. #2640 was merged 13 days ago, but npm says last publish was a month ago.

0reactions
jacqueswhocommented, May 20, 2022

Please use latest version 4.2.0

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why isn't the submit button appearing or working on my form?
If a submit button doesn't appear at the end of a form, it usually means that the "X Questions to Go" counter is...
Read more >
Submit button doesn't work - Stack Overflow
You need to ensure you have the submit button within the form element and an appropriate action attribute on the form element is...
Read more >
try to automate Microsoft form but the submit button dosent work
Solved: Hello I am trying to automate Microsoft form but the submit button doesn't work any idea any one or some link to...
Read more >
Don't display submit button · Issue #1602 · rjsf-team ... - GitHub
@epicfaace I was just about to log an enhancement regarding the submit button. was thinking we have submitButtonProps to give options.
Read more >
Button UI Not Working with The new Input system - Unity Forum
I just needed to select a button on the next menu (so for me it was Options Button, list of On Click events...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found