Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Remove innerHTML usage from dynamic typeahead#8900

Merged
anna-dingler merged 4 commits into
mainfrom
users/annadingler/trusted-types-refresh
May 7, 2024
Merged

Remove innerHTML usage from dynamic typeahead#8900
anna-dingler merged 4 commits into
mainfrom
users/annadingler/trusted-types-refresh

Conversation

@anna-dingler

@anna-dingler anna-dingler commented Apr 30, 2024

Copy link
Copy Markdown
Contributor

Related Issue

Fixes #8902

Description

Remove innerHTML usage from dynamic typeahead feature. Now we construct the bold text with individual spans + styling.

Sample Card

{
	"type": "AdaptiveCard",
	"version": "1.6",
	"body": [
		{
			"type": "Input.ChoiceSet",
			"id": "dynamicChoiceSet",
			"label": "Enter the name of your team",
			"placeholder": "AdaptiveCards",
			"isRequired": true,
			"errorMessage": "You must select a valid team",
			"choices": [
				{
					"title": "Office",
					"value": "1"
				},
				{
					"title": "Teams",
					"value": "2"
				},
				{
					"title": "Outlook",
					"value": "3"
				}
			],
			"choices.data": {
				"type": "Data.Query",
				"dataset": "teamScopeInOrg",
				"count": 15,
				"skip": 0
			}
		}
	]
}

How Verified

Verified manually on the AC site.

Example HTML:
image

Behavior remains the same: https://github.com/microsoft/AdaptiveCards/assets/98650930/23c9ecff-5507-4146-a064-db98b3932e62

@anna-dingler anna-dingler marked this pull request as ready for review May 1, 2024 16:16
@anna-dingler anna-dingler enabled auto-merge (squash) May 6, 2024 21:25
@anna-dingler anna-dingler merged commit e946c14 into main May 7, 2024
@anna-dingler anna-dingler deleted the users/annadingler/trusted-types-refresh branch May 7, 2024 18:38
jwoo-msft pushed a commit that referenced this pull request May 23, 2024
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.

Remove innerHTML usage from adaptivecards

3 participants