Skip to content

[TS][Renderer] Input.Number.value as string in Action.Submit#5134

Merged
dclaux merged 2 commits intomainfrom
js/input-number-as-strng-in-submit
Dec 7, 2020
Merged

[TS][Renderer] Input.Number.value as string in Action.Submit#5134
dclaux merged 2 commits intomainfrom
js/input-number-as-strng-in-submit

Conversation

@dclaux
Copy link
Copy Markdown
Member

@dclaux dclaux commented Dec 7, 2020

Related Issue

Fixes #5111

Description

Reverts to emitting Input.Number.value as a string in an Action.Submit.data

Sample Card

{
    "type": "AdaptiveCard",
    "body": [
        {
            "type": "Input.Number",
            "placeholder": "Placeholder text",
            "min": 1,
            "max": 10,
            "value": 8,
            "id": "fsd"
        }
    ],
    "actions": [
        {
            "type": "Action.Submit",
            "title": "Action.Submit"
        }
    ],
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "version": "1.3"
}

How Verified

Verified manually in adaptivecards-designer-app

Microsoft Reviewers: Open in CodeFlow

@ghost
Copy link
Copy Markdown

ghost commented Dec 7, 2020

Hi @dclaux. Thanks for helping make the AdaptiveCards JS renderer + tooling better. As additional verification, once the JS build succeeds, please go to the test site to test out your website/designer changes.

},
"hexo": {
"version": "5.2.0"
"version": "4.2.1"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't think you meant to change this :)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't, but then help me understand how it happened - I litterally just compiled (npx lerna run build)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure really -- might be something hexo modified when you were testing your changes?


if (input.id) {
this._processedData[input.id] = input.value;
this._processedData[input.id] = typeof input.value === "string" ? input.value : input.value.toString();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good :)

@ghost ghost removed the Needs: Author Feedback label Dec 7, 2020
Copy link
Copy Markdown
Member

@paulcam206 paulcam206 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the package.json update! changes look good

:shipit:

@dclaux dclaux merged commit 58e35db into main Dec 7, 2020
@dclaux dclaux deleted the js/input-number-as-strng-in-submit branch December 7, 2020 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[JavaScript][Input.Number] [Type of value has changed with latest update]

2 participants