Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

AtlasKit: How to only accept numbers in an Inline Edit and Textfield

Imogen Drews July 2, 2021

Hi everyone, I have quite a basic problem that I was hoping someone could help me with. Basically I have an Inline Edit that has a Textfield inside of it which I want to only accept numbers and refuse letters. With a normal Javascript input field I could just set the type to number but I'm not too sure how to do this with Textfield.

 

1 answer

1 accepted

0 votes
Answer accepted
Luis Sagastume
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 15, 2021

It is not in the documentation but the component can receive a type that is put in the input tag.

<Textfield type='number'>

 

I found it in the source code:

https://bitbucket.org/atlassian/atlaskit/src/c7cb37bac2662d1b69bf81c3266a3479b15a5a4b/packages/field-text/src/FieldText.jsx

Imogen Drews October 18, 2021

Thanks so much! This helps a lot.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events