-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Problem:
Large numbers in NumberRange are hard to read without formatting (e.g., "1000000").
Solution:
Implement a Svelte action to apply a specific formatting to the value of the min and max fields of NumberRange.
Description of the proposal:
- The backend must specify the format as a regex expression
- Add format property to NumberRange Class
class NumberRange {
...
public Format: string | null = null;
}
and to the controller
export class Controller extends InputController<NumberRange> {
...
public format: string | null = null;
}
- Implement a Svelte action that would accept a regex expression as a parameter to format a value (e.g.,
"regex:\\B(?=(\\d{3})+(?!\\d))")
- By default (or if format is null), there is no formatting.
- Display is formatted on blur, raw on focus.
- Can be used as a normal svelte action
<input bind:value={controller.minValue} use:formatInput={{ format: format }}/>
- No serialization changes in the NumberRange component
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request