Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

Version 1.3.0 removing props #41

Closed
xbral opened this issue May 17, 2019 · 3 comments
Closed

Version 1.3.0 removing props #41

xbral opened this issue May 17, 2019 · 3 comments
Assignees

Comments

@xbral
Copy link

xbral commented May 17, 2019

In version 1.3.0, it is removing the form's properties, like the Id, and returning only a data-testid, losing all the stylization done.

@cleitonper
Copy link
Contributor

Aparently this issue was introduced in the commit a53d72b, in the following lines:

-import React, { FormEvent, useState, FormHTMLAttributes } from "react"
+import React, { FormEvent, useState, useEffect } from "react";

-interface Props extends FormHTMLAttributes<HTMLFormElement> {
+interface Props {

-<form data-testid="form" {...rest} onSubmit={handleSubmit}>
+<form data-testid="form" onSubmit={handleSubmit}>

Removing FormHTMLAttributes we're losing all html attributes like id and className passed to Form component. In my case, with the removal of the className attribute from form element I lost all my styled-components style.

Currently i had to roolback to v1.0.1 until this problem is not solved.

@diego3g
Copy link
Contributor

diego3g commented May 17, 2019

For classes the #35 will solve. Other attributes were removed from form since we're overriding onSubmit function and TypeScript was complaining about that. We'll take a look at it and see if we can take all back.

@diego3g
Copy link
Contributor

diego3g commented Jun 5, 2019

This issue will be solved by #77 and it will probably merge this week.

@diego3g diego3g closed this as completed Jun 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants