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

fix: Type 'CSSProperties' is not assignable to type 'Style' error #388

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

preflower
Copy link

@preflower preflower commented Aug 30, 2023

react-textarea-autosize Style type internal conflict
image
and CSSProperties default supports height property, so I think we can remove union type

@changeset-bot
Copy link

changeset-bot bot commented Aug 30, 2023

⚠️ No Changeset found

Latest commit: e96b50e

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@Andarist
Copy link
Owner

Please share a test case that motivates this change.

@preflower
Copy link
Author

preflower commented Aug 30, 2023

Please share a test case that motivates this change.

This is a type error, I can't provide a test case, or do you want a minimal reproducible code repo?

@Andarist
Copy link
Owner

Yes, a sample code that errors but shouldn't (or the other way around).

@preflower
Copy link
Author

just because I try to set height is string type;
Here is a mini repo: https://stackblitz.com/edit/vite-react-ts-dwvju5?file=src%2FApp.tsx

@preflower
Copy link
Author

just because I try to set height is string type; Here is a mini repo: stackblitz.com/edit/vite-react-ts-dwvju5?file=src%2FApp.tsx

Although height should not be applied in react-textarea-autosize component...should use minRow and maxRow instead of it.

@Andarist
Copy link
Owner

Although height should not be applied in react-textarea-autosize component...should use minRow and maxRow instead of it.

☝️ this. height is only there to aid with SSR scenarios when we can't measure the DOM.

@preflower
Copy link
Author

Although height should not be applied in react-textarea-autosize component...should use minRow and maxRow instead of it.

☝️ this. height is only there to aid with SSR scenarios when we can't measure the DOM.

Yeah, but current height only support number type, it also should be support string type

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants