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-input-text doesn't show anything when pattern is not matched #11148

Open
2 of 6 tasks
MikeTschudi opened this issue Dec 26, 2024 · 0 comments
Open
2 of 6 tasks
Labels
0 - new New issues that need assignment. ArcGIS Solutions Issues logged by ArcGIS Solutions team members. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. calcite-components Issues specific to the @esri/calcite-components package. impact - p3 - not time sensitive User set priority impact status of p3 - not time sensitive needs triage Planning workflow - pending design/dev review.

Comments

@MikeTschudi
Copy link
Member

MikeTschudi commented Dec 26, 2024

Check existing issues

Actual Behavior

The sample line

 <calcite-input-text id="srcId" max-length="32" min-length="32" pattern="[a-f0-9A-F]{32}" placeholder="Item, group, or folder id"></calcite-input-text>

only honors the max-length restriction. There's no lack-of-validity display when the text is too short or doesn't match the pattern. (Also tried with "^" prefix and "$" suffix.)

Expected Behavior

Highlights like we see in MDN, e.g., if value is too short:
image

MDN playground source:

  <label>
    Enter AGO id <input
      pattern="[a-f0-9A-F]{32}"
      size="32"
    />
  </label>

Reproduction Sample

https://codepen.io/miketschudi/pen/GgKEaPY?editors=100

Reproduction Steps

above CodePen is for 3.0.0-next.81. For 2.13.2,
https://codepen.io/miketschudi/pen/WbeOBLV?editors=100

Reproduction Version

3.0.0-next.81

Relevant Info

Windows 11 Enterprise using Chrome 131.0

Here's what the component shows when given "not an id!" in the calcite-input-text field:
image

Regression?

No response

Priority impact

impact - p3 - not time sensitive

Impact

no effect yet--just found this in a prototype for future work

Calcite package

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

Esri team

ArcGIS Solutions

@MikeTschudi MikeTschudi added 0 - new New issues that need assignment. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. needs triage Planning workflow - pending design/dev review. labels Dec 26, 2024
@github-actions github-actions bot added ArcGIS Solutions Issues logged by ArcGIS Solutions team members. calcite-components Issues specific to the @esri/calcite-components package. impact - p3 - not time sensitive User set priority impact status of p3 - not time sensitive labels Dec 26, 2024
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 Solutions Issues logged by ArcGIS Solutions team members. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. calcite-components Issues specific to the @esri/calcite-components package. impact - p3 - not time sensitive User set priority impact status of p3 - not time sensitive needs triage Planning workflow - pending design/dev review.
Projects
None yet
Development

No branches or pull requests

1 participant