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

Signature component doesn't work when applying its value directly an on button click save. #14812

Closed
1 task done
ConorWebb96 opened this issue Oct 17, 2024 · 2 comments
Closed
1 task done
Labels
actions Relating to Budibase app actions avalanche OSS team bb-components bug Something isn't working forms

Comments

@ConorWebb96
Copy link
Contributor

Checklist

  • I have searched budibase discussions and github issues to check if my issue already exists

Hosting

  • Self
    • Method: docker compose
    • Budibase Version: 2.33.2
    • App Version: 2.33.2

Describe the bug
Error thrown when trying to bind and save the value of a signature field on a button click. The error thrown is {"message":"Unexpected error," "status":400,"error":"Unexpected error"}. The only difference I can see is in the payload. One is a straight JS object, and the other passes a stringified version. I'm assuming the error is being thrown because of this.

To Reproduce
Steps to reproduce the behavior:

  1. Import the attached app
  2. Go to the home screen
  3. Click on a record and add a signature
  4. Click save
  5. See error

Expected behavior
If I want to do this on a specific step, I should be able to save a signature on its own.

Screenshots
Screenshot 2024-10-17 at 09 44 06

Normal payload
Screenshot 2024-10-17 at 09 52 51

Action save payload
Screenshot 2024-10-17 at 09 49 23

App Export
signature issue-export-1729155203158.tar.gz

@ConorWebb96 ConorWebb96 added bug Something isn't working forms actions Relating to Budibase app actions avalanche OSS team bb-components labels Oct 17, 2024
@aptkingston
Copy link
Member

aptkingston commented Oct 31, 2024

I'm assuming you're using a normal binding like {{ Form.Fields.Signature }} here, while adding the field manually in a save row action? If so you'll just need to use the literal helper to ensure it's kept as an object (or use JS). I don't think this is a bug because it's just how bindings have always worked - everything is a string by default.

Going to close this since it's working as intended and you just need the literal helper 👍 Appreciate it's not very obvious that this is the case, but there's nothing we can really do to change this at it's fundamentally a limitation of how handlebars works.

Edit: just confirming adding literal fixes it.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
actions Relating to Budibase app actions avalanche OSS team bb-components bug Something isn't working forms
Projects
None yet
Development

No branches or pull requests

2 participants