Skip to content

Commit ea46036

Browse files
committed
fix: Fixed type errors and updated package.json
1 parent bddf98b commit ea46036

2 files changed

Lines changed: 7 additions & 9 deletions

File tree

package.json

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"name": "ink-form",
2+
"name": "@codify/ink-form",
33
"type": "module",
4-
"version": "2.0.1",
5-
"description": "Complex user-friendly form component for React Ink",
4+
"version": "0.0.0",
5+
"description": "Complex user-friendly form component for Codify",
66
"main": "lib/index.js",
77
"exports": "./lib/index.js",
88
"types": "lib/index.d.ts",
@@ -18,10 +18,8 @@
1818
"commandline",
1919
"cmd"
2020
],
21-
"repository": "https://github.com/lukasbach/ink-form",
22-
"author": "Lukas Bach <lbach@outlook.de>",
23-
"license": "MIT",
24-
"bugs": "https://github.com/lukasbach/ink-form/issues",
21+
"repository": "https://github.com/kevinwang5658/@codify/ink-form",
22+
"author": "Lukas Bach <lbach@outlook.de> modified by Kevin Wang",
2523
"devDependencies": {
2624
"@types/node": "20.14.8",
2725
"@types/react": "^18.2.41",

src/ScrollArea.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export function ScrollArea({height, isStart, children, editingMode}) {
4242
const focusManager = useFocusManager();
4343
const [canScroll, setCanScroll] = useState(true);
4444
const [isEditing, setIsEditing] = useState(false);
45-
const innerRef = React.useRef();
45+
const innerRef = React.useRef(null);
4646

4747
useLayoutEffect(() => {
4848
// Couple of custom logic baked into here to improve the user experience
@@ -70,7 +70,7 @@ export function ScrollArea({height, isStart, children, editingMode}) {
7070
}
7171

7272
React.useEffect(() => {
73-
const dimensions = measureElement(innerRef.current);
73+
const dimensions = innerRef.current ? measureElement(innerRef.current) : { width: 0, height: 0 };
7474

7575
dispatch({
7676
type: 'SET_INNER_HEIGHT',

0 commit comments

Comments
 (0)