microsoft / microsoft/pxt

textdropdown

Open
#9,548 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
2.3k
Forks
641
Avg merge
12h 4m
Merged PRs (30d)
57

Description

Bug Template

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'https://makecode.com/playground#field-editors-dropdowns'
  2. Change the word.fieldOptions.values to the correct code:
    Line 24:
    //% word.fieldOptions.values='[["hi"],["hello"]"'

According to https://github.com/microsoft/pxt/blob/master/docs/defining-blocks.md line 823) :
fieldOptions.values - a list of simple values to select from, like:
vehicles.fieldOptions.values='[["truck"], ["airplane"], ["cruise ship"]]'

  1. Click on 'run' (I hope it is called run, in german it is called "Ausführen")
  2. Add block to "on start"
  3. Click on dropdown

Expected behavior
I would expect each word do be there, but only each character is there. Moreover an error is thrown stating "Cannot find name "hello"".

Screenshots
grafik

Desktop (please complete the following information):

  • OS: Win11
  • Browser: Firefox (113.0.2), Edge

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the reproduction at makecode.com/playground#field-editors-dropdowns and compare the fieldOptions.values example at docs/defining-blocks.md line 823 with the issue's line 24. Verify how the dropdown parses the values and confirm that it shows whole words such as “hi” and “hello” without reporting “Cannot find name” errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.