Skip to content

[API Bug] Form Selection jumps around #152

@tonka3000

Description

@tonka3000

I try to have dynamic FromTextArea's. The problem is that the dynamically spawn TextAreas have black text color in dark mode, which makes it unreadable. Also the selection jump back and forth (maybe related to #66)

Raycast version: 1.25.1

Description

Steps To Reproduce

export function TweetSendForm(props: { replyTweet?: TweetV1 | undefined }) {
  const [messages, setMessages] = useState<string[]>(["something"]);
  const rt = props.replyTweet;
  const submitText = rt ? "Send Reply" : "Send Tweet";
  console.log(messages);
  return (
    <Form
      onSubmit={submit}
      actions={
        <ActionPanel>
          <SubmitFormAction title={submitText} onSubmit={(values: TweetFormValues) => submit(values, rt)} />
          <ActionPanel.Item title="Add" onAction={() => setMessages([...messages, "test"])}/>
        </ActionPanel>
      }
    >
      <FormTextArea id="text" title="Text" placeholder="What's happening?" />
      {messages.map((m, i) => (
        <FormTextArea id={`t${i}`} title={`m ${i}`} placeholder="aaa" defaultValue={m} />
      ))}
    </Form>
  );
}

The current behavior

CleanShot.2021-10-20.at.22.15.20.mp4

The expected behavior

Text color like in the non dynamic version + stable selection.

Metadata

Metadata

Assignees

Labels

apiIssues related to APIbugSomething isn't workingstatus: fixed in next releaseThe issue will be closed once next release is available

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions