Skip to content

Conversation

sandros94
Copy link
Member

πŸ”— Linked issue

Resolves: N/A

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

This mainly focuses on using these components in forms with validation libraries.

Considering that most validation libraries refers to value that are T | null as nullable I decided to rename the modifier (taking advantage of the major), while also adding an optional modifier to accept undefined.

Currently upstream's NumberFieldRoot only accept optional values but not nullable ones. At first I though about a type inconsistency but noticed a strange pattern in tests when I was forcing it, decided to only implement optional for now.

What other components might take advantage of this other than UInput, UTextarea and UInputNumber?

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@sandros94 sandros94 self-assigned this Aug 28, 2025
@sandros94 sandros94 added enhancement New feature or request v4 #4488 labels Aug 28, 2025
Copy link

pkg-pr-new bot commented Aug 28, 2025

npm i https://pkg.pr.new/@nuxt/ui@4838

commit: 389d20c

@benjamincanac benjamincanac changed the title refactor(Input)!: rename nullify modifier to nullable and add optional refactor(form)!: rename nullify modifier to nullable and add optional Sep 1, 2025
@benjamincanac benjamincanac changed the title refactor(form)!: rename nullify modifier to nullable and add optional refactor(components)!: rename nullify modifier to nullable and add optional Sep 1, 2025
@benjamincanac benjamincanac changed the title refactor(components)!: rename nullify modifier to nullable and add optional feat(components)!: rename nullify modifier to nullable and add optional Sep 1, 2025
Copy link
Member

@benjamincanac benjamincanac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sandros94 sandros94 force-pushed the refacotr/model-modifiers branch from 6b80502 to 236bd48 Compare September 1, 2025 13:36
@github-actions github-actions bot added the documentation Improvements or additions to documentation label Sep 1, 2025
@benjamincanac benjamincanac removed the documentation Improvements or additions to documentation label Sep 1, 2025
@benjamincanac benjamincanac merged commit 83b0306 into v4 Sep 1, 2025
10 of 11 checks passed
@benjamincanac benjamincanac deleted the refacotr/model-modifiers branch September 1, 2025 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v4 #4488
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants