Skip to content

re-define shortcut render error #898

Closed

Description

@chyroc

i re-define submit shortcut with code:

                    <Action.SubmitForm
                        title={cmdEnter.title}
                        icon={cmdEnter.icon}
                        shortcut={cmdEnter.key}
                        onSubmit={async (values) => {
                          ...
                        }}
                    />

then, raycast show error:

image

Activity

  1. added
    api
    bug
    on Feb 14, 2022
  2. chyroc commented on Feb 14, 2022

    @chyroc
    ContributorAuthor

    Repeated display Quick tips

  3. mattisssa commented on Feb 14, 2022

    @mattisssa
    Contributor

    Hey! Do you have the full code somewhere? It's hard to say what is off without context.

  4. chyroc commented on Feb 15, 2022

    @chyroc
    ContributorAuthor

    code:

    import {Action, ActionPanel, Form} from "@raycast/api";
    
    
    export default function Command() {
        function handleSubmit(values: any) {
            console.log(values);
        }
    
        return (
            <Form
                actions={
                    <ActionPanel>
                        <Action.SubmitForm
                            shortcut={{modifiers: ['cmd'], key: 'enter'}}
                            onSubmit={handleSubmit}/>
                    </ActionPanel>
                }
            >
    
                <Form.TagPicker id="tokeneditor" title="Tag picker">
                    <Form.TagPicker.Item value="tagpicker-item" title="TagPicker Item"/>
                </Form.TagPicker>
            </Form>
        );
    }
    
  5. chyroc commented on Feb 15, 2022

    @chyroc
    ContributorAuthor

    result:

    image

  6. added
    status: fixed in next release
    on Feb 28, 2022
  7. added a commit that references this issue on Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    apibugstatus: fixed in next release

    Type

    No type

    Fields

    Priority

    None yet

    Severity

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions