Skip to content

Conversation

ahmed-mgd
Copy link
Contributor

Fixes #1446

Comment on lines +511 to +513
} else {
const defaultVal = dim == 'min' ? 1 : 999;
changeElement.attr(dim, defaultVal);
Copy link
Contributor

Choose a reason for hiding this comment

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

I love the precision here in making just a small enough change, but sadly, I feel like it's not enough.

It seems to me that we should embed the min or max to fall back on. Take this for example, we should fall back to these values if they're defined.

some_element:
  widget: number_field
  min: 2
  max: 4

If we can't fallback to any values, then we just don't. I think the conservative route of just doing nothing is better than choosing 1 or 999. But we can document that these are fallback values when you use data-min or data-max sparingly.

@Bubballoo3 Bubballoo3 moved this from Awaiting Review to Changes Requested in PR Review Pipeline Oct 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Changes Requested

Development

Successfully merging this pull request may close these issues.

min/max handlers account for last setting

3 participants