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 { useAppDispatch } from 'app/store/storeHooks';
|
||||||
import { fieldValueChanged } from 'features/nodes/store/nodesSlice';
|
import { fieldValueChanged } from 'features/nodes/store/nodesSlice';
|
||||||
import {
|
import {
|
||||||
@ -12,10 +12,9 @@ const StringInputFieldComponent = (
|
|||||||
props: FieldComponentProps<StringInputFieldValue, StringInputFieldTemplate>
|
props: FieldComponentProps<StringInputFieldValue, StringInputFieldTemplate>
|
||||||
) => {
|
) => {
|
||||||
const { nodeId, field } = props;
|
const { nodeId, field } = props;
|
||||||
|
|
||||||
const dispatch = useAppDispatch();
|
const dispatch = useAppDispatch();
|
||||||
|
|
||||||
const handleValueChanged = (e: ChangeEvent<HTMLInputElement>) => {
|
const handleValueChanged = (e: ChangeEvent<HTMLTextAreaElement>) => {
|
||||||
dispatch(
|
dispatch(
|
||||||
fieldValueChanged({
|
fieldValueChanged({
|
||||||
nodeId,
|
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);
|
export default memo(StringInputFieldComponent);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user