-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Fixes in
and not_in
filter views for integer, bigInt, decimal and float fields
#7930
Fixes in
and not_in
filter views for integer, bigInt, decimal and float fields
#7930
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 8541b89:
|
26e4ead
to
f2ca4d1
Compare
8dbc659
to
9832a32
Compare
input
types for integer, bigInt, decimal and float fields in the UI
? valueWithoutWhitespace.split(',').map(x => BigInt(x)) | ||
: BigInt(valueWithoutWhitespace); | ||
? valueWithoutWhitespace.split(',') | ||
: valueWithoutWhitespace; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fixes a JSON serialization error
Thanks @nya1 and @gautamsi - it is unfortunate that these fields are not locale friendly. We're currently experimenting with Adobe Spectrum in Keystone's updated design system, and that, or something like it, should help us unify and smooth the user experience across many of these field views. |
does this mean end of |
@gautamsi We're interested in react-aria specifically for accessibility. Since they also provide I18N solutions we'll be considering that too. The intention is to build a component library that's informed by and in service of, but decoupled from, the admin UI. Ideally consumers will be able to pick up the same pieces to build custom interfaces that fit seamlessly within Keystone's overall aesthetic and behaviour. |
input
types for integer, bigInt, decimal and float fields in the UIin
and not_in
filter views for integer, bigInt, decimal and float fields
Closes #7638
In
integer
andbigInt
fields I have changed theTextInput
type totext
(instead ofnumber
), this allows to enter commas, the filtering of the value (only digits, commas and minus sign) is already performed by a regex on theonChange
handler.With this change the filtering works as expected.
There is a comment above the
TextInput
regarding the type change but I'm not sure this is an old comment (prior to the onChange regex) or if we want to have a more advanced input.keystone/packages/core/src/fields/types/integer/views/index.tsx
Lines 213 to 216 in df88fe6