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

Remove automatic formatting of integer values #541

Merged
merged 2 commits into from
Aug 26, 2024

Conversation

phyr97
Copy link
Collaborator

@phyr97 phyr97 commented Aug 26, 2024

This PR removes the formatting for a value of a number field. This should lead to the behavior that formatting is optional and is not carried out by default.

Formatting of the number field must now be defined with the render option on the field itself. If number fields have benefited from the previous standard formatting, the following render function can now be used as an example:

render: fn assigns ->
  ~H"""
  <p><%= Number.Delimit.number_to_delimited(@value, precision: 0, delimiter: ".") %></p>
  """
end

@phyr97 phyr97 added the breaking-change A breaking change label Aug 26, 2024
@phyr97 phyr97 requested a review from Flo0807 August 26, 2024 07:47
@phyr97 phyr97 self-assigned this Aug 26, 2024
@Flo0807 Flo0807 changed the title Make formatting for number fields optional Remove automatic formatting of integer values Aug 26, 2024
@Flo0807
Copy link
Collaborator

Flo0807 commented Aug 26, 2024

I changed the title of this PR because the term "number field" can be misleading, as formatting was performed for all Backpex fields.

@Flo0807 Flo0807 merged commit d3fe381 into develop Aug 26, 2024
6 checks passed
@Flo0807 Flo0807 deleted the feature/make-formatting-optional branch August 26, 2024 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change A breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants