Temporary patch for #20 #27

Merged
Lemmmy merged 1 commits from patch-1 into develop-1.8 2020-03-27 15:11:21 -04:00
Lemmmy commented 2020-03-27 13:20:36 -04:00 (Migrated from github.com)

This temporarily reverts the change to the price field in swshop's Store tab from 64ec8c82d3.

The problem, as you probably know, is in TextEntry in opus:
cef5b21921/sys/modules/opus/ui/components/TextEntry.lua (L108-L117)

The transform function is ran every time a character is typed, which results in decimal values like 0.05 being transformed to 5, as it's typed like this:

Input Transformed
0 0
0. 0
0.0 0
0.05 5 (05)

Really, a proper transformer for decimal numbers should be implemented, but for now, this gets shops working again.

This temporarily reverts the change to the price field in swshop's Store tab from 64ec8c82d301639bc397aafe69dd74974b8161ca. The problem, as you probably know, is in TextEntry in opus: https://github.com/kepler155c/opus/blob/cef5b21921705736249428274d12062b982c0bbc/sys/modules/opus/ui/components/TextEntry.lua#L108-L117 The transform function is ran every time a character is typed, which results in decimal values like `0.05` being transformed to `5`, as it's typed like this: | Input | Transformed | |-------|-------------| | 0 | 0 | | 0. | 0 | | 0.0 | 0 | | 0.05 | 5 (05) | Really, a proper transformer for decimal numbers should be implemented, but for now, this gets shops working again.
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: MayaTheShy/opus-apps#27