playcanvas / pcui

UI component library for web-based tools
http://playcanvas.github.io/pcui
MIT License
667 stars 64 forks source link

Percentages in math ops for number fields #188

Open LeXXik opened 3 years ago

LeXXik commented 3 years ago

The current feature of doing math operations, like adding number values in the number fields is super helpful. If possible, please enable adding percentages as well. For example, current value is 123. Allow the use of 123+10%, which would add 10 percent of the current value to the current value.

willeastcott commented 1 year ago

Hey @ellthompson - should I transfer this issue to the PCUI repo, or do you think this request should remain Editor-specific?

ellthompson commented 1 year ago

This should be moved to PCUI as it's a feature request for the NumericInput component. We'll need to update the logic here: https://github.com/playcanvas/pcui/blob/ad64183f99aeb75bf99316c30774f21403027891/src/components/NumericInput/index.ts#L199