Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Text filter submits form #2683

Open
2 tasks done
JElgar opened this issue Sep 9, 2024 · 0 comments
Open
2 tasks done

[Bug]: Text filter submits form #2683

JElgar opened this issue Sep 9, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@JElgar
Copy link

JElgar commented Sep 9, 2024

Browser

Chrome, Safari, Firefox, Edge

Package version

3.0.1335

React version

18.3.1

Description

We have a form, where we allow users to select a value using a table. The table has a text filter.

If a user clicks enter in the text filter, the form is submitted. Ideally we could disable this functionality on the text filter.

Source code

No response

Reproduction

Sandbox

import { Form, Table, TextFilter } from "@cloudscape-design/components";

export default function App() {
  return (
    <form>
      <Form>
        <Table items={[]} columnDefinitions={[]} filter={<TextFilter />} />
      </Form>
    </form>
  );
}

Click enter when focuses on the text filter and see that the form submits

Code of Conduct

@JElgar JElgar added the bug Something isn't working label Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant