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

feat(Field): allow suffix and prefix #756

Merged
merged 8 commits into from
Dec 12, 2024
Merged

feat(Field): allow suffix and prefix #756

merged 8 commits into from
Dec 12, 2024

Conversation

ecarreras
Copy link
Member

@ecarreras ecarreras commented Dec 10, 2024

This pull request includes enhancements to the Char, Float, and Integer input components in the src/widgets/base directory. The changes mainly focus on adding support for prefixes and suffixes to these input fields.

Enhancements to input components:

  • src/widgets/base/Char.tsx: Added support for prefix and suffix properties to the CharInput component, displaying them with a disabled text color. [1] [2]
  • src/widgets/base/Float.tsx: Added support for prefix and suffix properties to the Float component, displaying them with a disabled text color.
  • src/widgets/base/Integer.tsx: Added support for prefix and suffix properties to the Integer component, displaying them with a disabled text color.

@ecarreras ecarreras added the enhancement New feature or request label Dec 10, 2024
@ecarreras ecarreras self-assigned this Dec 10, 2024
mguellsegarra added a commit that referenced this pull request Dec 10, 2024
@mguellsegarra
Copy link
Collaborator

mguellsegarra commented Dec 10, 2024

@ecarreras

He ajustat dels 3 components amb totes les variants i els he provat a ovlab:

  • Floats i Integers amb camps requerits i no requerits
  • Camps de tipus Char amb les següents variacions:
    • Translatable requerit i no requerit
    • Translatable Amb i sense ID
    • Password requerit i no requerit
    • Char normal requerit i no requerit

He aprofitat per optimitzar el rendiment dels 3 components amb memo, useMemo i useCallback per evitar renderitzats innecessaris

He creat un component AddOnElement comú pels 3 components per reduir codi duplicat i millorar el rendiment

Fes-hi una ullada i prova si pots el tema dels addons, que és el que em falta per provar que es vegi correctament.

Ho he pujat a alpha - v3.0.0-alpha.226 encara que no ha d'afectar a ovlab perquè no té el canvi de l'ERP entenc.

@mguellsegarra mguellsegarra merged commit 64a48bd into v2 Dec 12, 2024
1 check passed
@mguellsegarra mguellsegarra deleted the suffix-and-prefix branch December 12, 2024 14:04
github-actions bot pushed a commit that referenced this pull request Dec 12, 2024
# [2.47.0](v2.46.1...v2.47.0) (2024-12-12)

### Features

* autorefresh fields ([#738](#738)) ([a880c0f](a880c0f))
* **Field:** allow suffix and prefix ([#756](#756)) [skip ci] ([64a48bd](64a48bd))
* update gisce/ooui to v2.24.0 ([#765](#765)) [skip ci] ([3473685](3473685))
* update gisce/react-formiga-table to v1.9.0 ([#766](#766)) [skip ci] ([89cba68](89cba68))
@mguellsegarra
Copy link
Collaborator

Vigent a la v2.40.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants