Fix autogrowing input glitch (#10224)
- Removed unnecessary resize observer - Removed unused component - Fixed autogrowing input glitch # Before https://github.com/user-attachments/assets/a7de71d5-bc6e-495f-851c-18df596749dd # After https://github.com/user-attachments/assets/63588d0e-1122-43fe-b685-3f3a4ec4114e
This commit is contained in:
@ -112,65 +112,6 @@ export const MyComponent = () => {
|
||||
|
||||
</ArticleTabs>
|
||||
|
||||
|
||||
## Entity Title Double Text Input
|
||||
|
||||
Displays a pair of text inputs side by side, allowing the user to edit two related values simultaneously.
|
||||
|
||||
<ArticleTabs label1="Usage" label2="Props">
|
||||
|
||||
<ArticleTab>
|
||||
|
||||
<SandpackEditor content={`import { RecoilRoot } from "recoil";
|
||||
import React, { useState } from "react";
|
||||
import { EntityTitleDoubleTextInput } from "@/ui/input/components/EntityTitleDoubleTextInput";
|
||||
|
||||
export const MyComponent = () => {
|
||||
|
||||
const [firstValue, setFirstValue] = useState(
|
||||
"First Value"
|
||||
);
|
||||
const [secondValue, setSecondValue] = useState(
|
||||
"Second Value"
|
||||
);
|
||||
|
||||
const handleInputChange = (newFirstValue, newSecondValue) => {
|
||||
setFirstValue(newFirstValue);
|
||||
setSecondValue(newSecondValue);
|
||||
};
|
||||
|
||||
|
||||
return (
|
||||
<RecoilRoot>
|
||||
<EntityTitleDoubleTextInput
|
||||
firstValue={firstValue}
|
||||
secondValue={secondValue}
|
||||
firstValuePlaceholder="Enter First Value"
|
||||
secondValuePlaceholder="Enter Second Value"
|
||||
onChange={handleInputChange}
|
||||
/>
|
||||
</RecoilRoot>
|
||||
);
|
||||
};`} />
|
||||
|
||||
|
||||
</ArticleTab>
|
||||
|
||||
<ArticleTab>
|
||||
|
||||
<ArticlePropsTable options={[
|
||||
['firstValue', 'string', 'The value for the first text input'],
|
||||
['secondValue', 'string', 'The value for the second text input'],
|
||||
['firstValuePlaceholder', 'string', 'Placeholder text for the first text input, displayed when the input is empty'],
|
||||
['secondValuePlaceholder', 'string', 'Placeholder text for the second text input, displayed when the input is empty'],
|
||||
['onChange', 'function', 'The callback function you want to trigger when the text input changes']
|
||||
]} />
|
||||
|
||||
|
||||
</ArticleTab>
|
||||
</ArticleTabs>
|
||||
|
||||
|
||||
## Text Area
|
||||
|
||||
Allows you to create multi-line text inputs.
|
||||
|
||||
Reference in New Issue
Block a user