react-textarea-autosize icon indicating copy to clipboard operation
react-textarea-autosize copied to clipboard

rowCount doesn't exist on type "TextareaHeightChangeMeta"

Open josephmturner opened this issue 5 years ago • 6 comments

Hello! Thank you for this great component!

I am interested in determining in which line the cursor is currently placed, and I thought I might find a solution involving rowCount. When I tried to log it, as demonstrated in the demo, I received this error: Property 'rowCount' does not exist on type 'TextareaHeightChangeMeta'.

I though you might want to know that there seems to be a mismatch between the API and the docs.

(also, if you happen to know of any way that I can determine if the cursor is placed on the first line or the last line of the textarea, I would be very grateful to know!)

josephmturner avatar Jul 12 '20 07:07 josephmturner

Also, I just noticed that that same example in the demo uses the old API "useCacheForDOMMeasurements"

josephmturner avatar Jul 12 '20 07:07 josephmturner

Hi, thanks for the report - it seems that I have not published new docs when releasing v8. I've tried to do that yesterday and unfortunately, I've destroyed the docs completely in the process 🙈 I've tried to resolve the problem with the docs:build script but ran into a bug in Parcel 1 and even in Parcel 2 when I've tried to upgrade to it. I've created an issue for that in their repo and I hope to get a quick resolution for this - if not I will dig further to fix this on my side here.

Andarist avatar Jul 15 '20 19:07 Andarist

You're welcome. Thank you for your good work on this project! Very useful :)

josephmturner avatar Jul 18 '20 05:07 josephmturner

Just so you know, the sidebar is still links to http://andreypopp.github.io/react-textarea-autosize/ as the demo (which gives a 404 error), and the README now links to https://andarist.github.io/react-textarea-autosize/ (which contains nothing but a header, reading "React <TextareaAutosize /> component")

josephmturner avatar Jul 19 '20 19:07 josephmturner

Thanks for the notice - I've fixed this. The demo site is still not functioning properly though - will have to dig deeper, but it might take me some days to do that.

Andarist avatar Jul 20 '20 09:07 Andarist

You're welcome! Thank you.

josephmturner avatar Jul 20 '20 10:07 josephmturner