-
Notifications
You must be signed in to change notification settings - Fork 607
Open
Description
Implementation of fields of another type in pxtJsonOptions. In addition to checkbox, I would like an input in which a string would be entered.
I want to implement in pxt-ev3, so that it would be possible to specify a project folder, so that after that the download would occur in this folder, so that it would be created in advance. I have already tested this possibility and it works.
{pxtJsonOptions.map(option =>
option.type === "checkbox" ? (
<sui.Checkbox
key={option.property}
inputLabel={pxt.Util.rlf(`{id:setting}${option.label}`)}
checked={!!c?.[option.property as keyof pxt.PackageConfig]}
onChange={value => this.applyPropertyCheckbox(option, value)}
/>
) : option.type === "input" ? (
<sui.Input
key={option.property}
id={option.property}
ariaLabel={option.label}
value={(c as any)?.[option.property] || ""}
onChange={(v: string) => {
(c as any)[option.property] = v;
this.parent.forceUpdate();
}}
autoComplete={false}
) : undefined
)}
Metadata
Metadata
Assignees
Labels
No labels