formatUserInput
Returns formatter user input based on the passed in attribute type. If type is not recognized, returns the input itself.
Syntax
context.formatting.formatUserInput(input, controlAttributes);
Available for
Model-driven and canvas apps
Parameters
Parameter Name | Type | Required | Description |
---|---|---|---|
input | unknown |
Yes | User input. |
behavior | ControlAttributes |
Yes | controlAttributes used by the formatter. |
Return Value
Type: string
Example
const controlAttributes = {
Type: "double",
Precision: 2,
PrecisionSource: 0,
Behavior: null,
OptionSet: null,
Format: null,
} as ControlAttributes;
context.formatter.formatUserInput("22", controlAttributes);
Related articles
Formatting
Power Apps component framework API reference
Power Apps component framework overview
Кері байланыс
https://aka.ms/ContentUserFeedback.
Жақында қолжетімді болады: 2024 жыл бойы біз GitHub Issues жүйесін мазмұнға арналған кері байланыс механизмі ретінде біртіндеп қолданыстан шығарамыз және оны жаңа кері байланыс жүйесімен ауыстырамыз. Қосымша ақпаратты мұнда қараңыз:Жіберу және пікірді көру