textdropdown
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:
- Go to 'https://makecode.com/playground#field-editors-dropdowns'
- 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"]]'
- Click on 'run' (I hope it is called run, in german it is called "Ausführen")
- Add block to "on start"
- 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
Desktop (please complete the following information):
- OS: Win11
- Browser: Firefox (113.0.2), Edge
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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