refactor: Preventing mousewheel from altering port value #22051
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
A user pointed out (in ZenDesk ticket 11999) that the value in the port number field, in the batch export config screen, can be changed unintentionally by scrolling with the mouse wheel. This PR is to prevent that by changing the field type from
number
totel
.Changes
Changed field type from
number
totel
on line 371 offrontend/src/scenes/batch_exports/BatchExportEditForm.tsx
Before:
![before-number](https://private-user-images.githubusercontent.com/227448/327595344-2df02ee5-b3a5-4238-b49b-d2d4ffb071fc.gif?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjA0NDQwNTYsIm5iZiI6MTcyMDQ0Mzc1NiwicGF0aCI6Ii8yMjc0NDgvMzI3NTk1MzQ0LTJkZjAyZWU1LWIzYTUtNDIzOC1iNDliLWQyZDRmZmIwNzFmYy5naWY_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNzA4JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDcwOFQxMzAyMzZaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1hOTI5YWI0ZmMwMDFmZThlOGE3NDI4MDUwYTA1MDE4ZDMxYTYyNTM3OTRmZGEzYTE3OTg3ODE0MzJjYzExZDYxJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.hlBB_Ocrnchwbjm4jCm44fZXxp7noAcIHDZPxtvBAow)
After:
![CleanShot 2024-05-02 at 14 21 16](https://private-user-images.githubusercontent.com/227448/327595269-6a401b53-63c7-4549-837c-2188da862db0.gif?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjA0NDQwNTYsIm5iZiI6MTcyMDQ0Mzc1NiwicGF0aCI6Ii8yMjc0NDgvMzI3NTk1MjY5LTZhNDAxYjUzLTYzYzctNDU0OS04MzdjLTIxODhkYTg2MmRiMC5naWY_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNzA4JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDcwOFQxMzAyMzZaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT1hM2ZhYWNiOWJhODM2NGI3NTJjODI4MmEwNjQxZGRhNGNhNTBmMTA2M2UyMGU4MDg3YTU0ZDFhZWI4MzRkYWY3JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.JEZ8bzCwEP6qWawH66OXO2Iw326f0ai0i9EFs7-dEkY)
Does this work well for both Cloud and self-hosted?
Yes
How did you test this code?
Tested on my local (see the 'after' gif above)