Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calcite number input: allow configuration to prevent entry of specific characters #10406

Open
2 of 6 tasks
ade10176 opened this issue Sep 26, 2024 · 1 comment
Open
2 of 6 tasks
Labels
0 - new New issues that need assignment. ArcGIS Field Apps Issues logged by ArcGIS Field Apps team members. calcite-components Issues specific to the @esri/calcite-components package. enhancement Issues tied to a new feature or request. estimate - 8 Requires input from team, consider smaller steps. impact - p1 - need for current milestone User set priority impact status of p1 - need for current milestone needs milestone Planning workflow - pending milestone assignment, has priority and/or estimate. p - high Issue should be addressed in the current milestone, impacts component or core functionality

Comments

@ade10176
Copy link

ade10176 commented Sep 26, 2024

Check existing issues

Description

Calcite number input currently supports characters like - or e. In a min/max file attachment use case, where - is not an acceptable entry, user currently can type in - and is persisted when:
• there are no numbers in the input (-)
• following numbers in the input (5-)

if the user enters 5-1, the - is omitted, and the entry becomes 51

if the user enters -5, the entry is not accepted and it triggers a validation error

Acceptance Criteria

Allow configuration to prevent specific character(s) to be entered in the number input. Also welcome to workaround ideas.

Relevant Info

Field Maps Designer issue https://github.com/ArcGIS/field-apps-web/issues/4229

Which Component

calcite input number

Example Use Case

No response

Priority impact

impact - p1 - need for current milestone

Calcite package

  • @esri/calcite-components
  • @esri/calcite-components-angular
  • @esri/calcite-components-react
  • @esri/calcite-design-tokens
  • @esri/eslint-plugin-calcite-components

Esri team

ArcGIS Field Apps

@ade10176 ade10176 added 0 - new New issues that need assignment. enhancement Issues tied to a new feature or request. needs triage Planning workflow - pending design/dev review. labels Sep 26, 2024
@github-actions github-actions bot added ArcGIS Field Apps Issues logged by ArcGIS Field Apps team members. calcite-components Issues specific to the @esri/calcite-components package. impact - p1 - need for current milestone User set priority impact status of p1 - need for current milestone labels Sep 26, 2024
@nCastle1
Copy link

I would also like this change for a Maps SDK for JavaScript use case. But I think the issue is more general; the numeric input should enforce the min and max values. Currently, the min/max values only appear to affect the behavior of the buttons.

@macandcheese macandcheese added p - high Issue should be addressed in the current milestone, impacts component or core functionality estimate - 8 Requires input from team, consider smaller steps. labels Feb 25, 2025
@DitwanP DitwanP added needs milestone Planning workflow - pending milestone assignment, has priority and/or estimate. and removed needs triage Planning workflow - pending design/dev review. labels Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 - new New issues that need assignment. ArcGIS Field Apps Issues logged by ArcGIS Field Apps team members. calcite-components Issues specific to the @esri/calcite-components package. enhancement Issues tied to a new feature or request. estimate - 8 Requires input from team, consider smaller steps. impact - p1 - need for current milestone User set priority impact status of p1 - need for current milestone needs milestone Planning workflow - pending milestone assignment, has priority and/or estimate. p - high Issue should be addressed in the current milestone, impacts component or core functionality
Projects
None yet
Development

No branches or pull requests

4 participants