redwoodjs / redwood

The App Framework for Startups
https://redwoodjs.com
MIT License
17.36k stars 1k forks source link

[Bug?]: SelectField setValueAs is not being triggered on change or submit #9268

Open taivo opened 1 year ago

taivo commented 1 year ago

What's not working?

The setValueAs prop does not get triggered for SelectField (but works fine for TextField)

validation={{
          setValueAs: (v) => {
            console.log('setValueAs is called')
            return v
          }
        }}

The only time I can get the setValueAs function above to run for SelectField is when the dev server hot reload changes in the corresponding file. I'm using Chrome MacOS.

Also, it looks to me like SelectField is not being validated onChange or onSubmit either (it's not limited to setValueAs ) but I have not setup full test cases to confirm.

How do we reproduce the bug?

No response

What's your environment? (If it applies)

System:
    OS: macOS 13.6
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.18.0 
    Yarn: 3.3.0 
  Browsers:
    Chrome: 117.0.5938.132
  npmPackages:
    @redwoodjs/auth-supabase-setup: 6.3.1 => 6.3.1
    @redwoodjs/cli-storybook: 6.3.1 => 6.3.1
    @redwoodjs/core: 6.3.1 => 6.3.1
    @redwoodjs/studio: 6.3.1 => 6.3.1

Are you interested in working on this?

Tobbe commented 1 year ago

Hey @taivo I'm sorry, but it looks like we missed this issue. I'll find someone to take a look at it.

@ahaywood Do you mind just trying to reproduce this and provide us with a GitPod project that demos the issue? And if you feel up for it, actually fixing the bug would obviously be great too, but no pressure 🙂