mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Feat: Change Input to Textbox
This commit is contained in:
parent
8d77c5ca96
commit
f73b45bcb5
@ -1,4 +1,4 @@
|
||||
import { Input } from '@chakra-ui/react';
|
||||
import { Textarea } from '@chakra-ui/react';
|
||||
import { useAppDispatch } from 'app/store/storeHooks';
|
||||
import { fieldValueChanged } from 'features/nodes/store/nodesSlice';
|
||||
import {
|
||||
@ -12,10 +12,9 @@ const StringInputFieldComponent = (
|
||||
props: FieldComponentProps<StringInputFieldValue, StringInputFieldTemplate>
|
||||
) => {
|
||||
const { nodeId, field } = props;
|
||||
|
||||
const dispatch = useAppDispatch();
|
||||
|
||||
const handleValueChanged = (e: ChangeEvent<HTMLInputElement>) => {
|
||||
const handleValueChanged = (e: ChangeEvent<HTMLTextAreaElement>) => {
|
||||
dispatch(
|
||||
fieldValueChanged({
|
||||
nodeId,
|
||||
@ -25,7 +24,18 @@ const StringInputFieldComponent = (
|
||||
);
|
||||
};
|
||||
|
||||
return <Input onChange={handleValueChanged} value={field.value}></Input>;
|
||||
return (
|
||||
<Textarea
|
||||
style={{
|
||||
height: '200px',
|
||||
width: '350px',
|
||||
resize: 'none',
|
||||
overflowY: 'auto',
|
||||
}}
|
||||
onChange={handleValueChanged}
|
||||
value={field.value}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
export default memo(StringInputFieldComponent);
|
||||
|
Loading…
Reference in New Issue
Block a user