Skip to content

Commit

Permalink
[MIRROR] Fixes text inputs (#1099)
Browse files Browse the repository at this point in the history
* [MIRROR] Fixes text inputs[NO GBP] [MDB IGNORE] (#25592)

---------

Co-authored-by: SkyratBot <[email protected]>
Co-authored-by: Jeremiah <[email protected]>
Co-authored-by: Bloop <[email protected]>
Co-authored-by: Iajret <[email protected]>
  • Loading branch information
5 people authored Dec 13, 2023
1 parent 92c6a28 commit a7f7759
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tgui/packages/tgui/interfaces/TextInputModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ export const TextInputModal = (props) => {
timeout,
title,
} = data;
const [input, setInput] = useState(placeholder);

const [input, setInput] = useState(placeholder || '');
const onType = (value: string) => {
if (value === input) {
return;
Expand Down Expand Up @@ -92,7 +93,10 @@ export const TextInputModal = (props) => {
};

/** Gets the user input and invalidates if there's a constraint. */
const InputArea = (props) => {
const InputArea = (props: {
input: string;
onType: (value: string) => void;
}) => {
const { act, data } = useBackend<TextInputData>();
const { max_length, multiline } = data;
const { input, onType } = props;
Expand Down

0 comments on commit a7f7759

Please sign in to comment.