Skip to content

fix(component-library): normalize pasted number separators#1258

Merged
Alastair Fraser (alastair-simon) merged 4 commits into
mainfrom
agent/fix-number-field-pasted-separators
Jul 9, 2026
Merged

fix(component-library): normalize pasted number separators#1258
Alastair Fraser (alastair-simon) merged 4 commits into
mainfrom
agent/fix-number-field-pasted-separators

Conversation

@keulinho

Copy link
Copy Markdown
Contributor

What?

Normalize pasted MtNumberField values with mixed decimal and grouping separators.

Why?

Pasted values such as 333,33 and 1.333,33 could be parsed inconsistently, causing currency values in Shopware Administration to silently become wrong amounts.

How?

The number parser now treats the rightmost . or , as the decimal separator and removes earlier separators as grouping separators. onInput uses that same parser so editing and blur behavior agree.

Testing?

node_modules/.bin/vitest run src/components/mt-number-field/mt-number-field.spec.ts -t "normalizes pasted numbers"

Screenshots (optional)

Anything Else?

Reported from shopware/shopware#16901.

@vercel

vercel Bot commented Jul 7, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
meteor-docs Ready Ready Preview, Comment Jul 9, 2026 7:38am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
meteor-component-library Ignored Ignored Preview Jul 9, 2026 7:38am

Request Review

@pkg-pr-new

pkg-pr-new Bot commented Jul 7, 2026

Copy link
Copy Markdown

Open in StackBlitz

@shopware-ag/meteor-admin-sdk

npm i https://pkg.pr.new/shopware/meteor/@shopware-ag/meteor-admin-sdk@1258

@shopware-ag/meteor-component-library

npm i https://pkg.pr.new/shopware/meteor/@shopware-ag/meteor-component-library@1258

@shopware-ag/create-meteor-extension

npm i https://pkg.pr.new/shopware/meteor/@shopware-ag/create-meteor-extension@1258

@shopware-ag/meteor-icon-kit

npm i https://pkg.pr.new/shopware/meteor/@shopware-ag/meteor-icon-kit@1258

@shopware-ag/meteor-prettier-config

npm i https://pkg.pr.new/shopware/meteor/@shopware-ag/meteor-prettier-config@1258

@shopware-ag/stylelint-plugin-meteor

npm i https://pkg.pr.new/shopware/meteor/@shopware-ag/stylelint-plugin-meteor@1258

@shopware-ag/meteor-tokens

npm i https://pkg.pr.new/shopware/meteor/@shopware-ag/meteor-tokens@1258

commit: e7f7cf2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants