Skip to content

Handle empty KSelect value gracefully in BirthYear/Gender selects #14137

@Abhishek-Punhani

Description

@Abhishek-Punhani

🙂 Looking for an issue? Welcome! This issue is open for contribution. If this is the first time you’re requesting an issue, please:

  • Read Contributing guidelines carefully. Pay extra attention to Using generative AI. Pull requests and comments that don’t follow the guidelines won’t be answered.
  • Confirm that you’ve read the guidelines in your comment.

Observed behavior

While creating an account, we see custom prop validation failed when value is empty because of the current computed function logic

Image

Errors and logs

[Vue warn]: Invalid prop: custom validator check failed for prop "value".

Expected behavior

  • When value is empty or no matching option exists, the component's selected computed should return null (or another value accepted by KSelect's validator) so KSelect sees an explicitly empty value rather than an invalid object.
  • No Vue prop-validator warnings should appear in the console during initial render or navigation.

User-facing consequences

Steps to reproduce

  1. Open the Create Account page (User Auth -> Create account)
  2. Inspect the browser console

Context

  • Application: Kolibri
  • OS: Debian (PopOs)

Metadata

Metadata

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions