redwoodjs / redwood

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

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

Open taivo opened 11 months ago

taivo commented 11 months 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 9 months 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 🙂