Behaviour Fix on new record addition (#3113)
* Delete record if no company added * EditMode on First column of new row added * Fix * Minor fixes * Passed scopeId * Changed FieldInputs to accept onChange handler * Removed getFieldType --------- Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
This commit is contained in:
@ -21,6 +21,7 @@ type TextInputProps = {
|
||||
onShiftTab?: (newText: string) => void;
|
||||
onClickOutside: (event: MouseEvent | TouchEvent, inputValue: string) => void;
|
||||
hotkeyScope: string;
|
||||
onChange?: (newText: string) => void;
|
||||
};
|
||||
|
||||
export const TextInput = ({
|
||||
@ -33,6 +34,7 @@ export const TextInput = ({
|
||||
onTab,
|
||||
onShiftTab,
|
||||
onClickOutside,
|
||||
onChange,
|
||||
}: TextInputProps) => {
|
||||
const [internalText, setInternalText] = useState(value);
|
||||
|
||||
@ -40,6 +42,7 @@ export const TextInput = ({
|
||||
|
||||
const handleChange = (event: ChangeEvent<HTMLInputElement>) => {
|
||||
setInternalText(event.target.value);
|
||||
onChange?.(event.target.value);
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
|
||||
Reference in New Issue
Block a user