Empty value within dropdown for array type oneOf

When I specify a schema with a set of oneOf consts & titles, I expected the dropdown to just display those provided options, not an additional one with an empty entry.

How can i prevent that entry from showing please?

[original thread by Simon Robinson]

Hi @simon-robinson(simon-robinson), the empty option is currently hard coded in the renderer. Therefore you’ll need to register a custom renderer which does not add this empty option. Note that you’ll also need to handle the edge case when there is no value in your data object.

If it’s enough for you to just not start with the empty value selected, you could just let Ajv generate a default value for you, see our FAQ for more information.

[Simon Robinson]

Thanks very much for that - ok makes sense.