Fix column not being saved properly (#1429)
* Fix email column not being saved * Fix URL fields not being clearable * Fix phone number clearing
This commit is contained in:
@ -30,7 +30,7 @@ export function GenericEditableURLCellEditMode({ columnDefinition }: OwnProps) {
|
||||
function handleSubmit(newText: string) {
|
||||
if (newText === fieldValue) return;
|
||||
|
||||
if (!isURL(newText)) return;
|
||||
if (newText !== '' && !isURL(newText)) return;
|
||||
|
||||
setFieldValue(newText);
|
||||
|
||||
|
||||
@ -85,7 +85,10 @@ export function PhoneCellEdit({
|
||||
const wrapperRef = useRef<HTMLDivElement | null>(null);
|
||||
|
||||
function handleSubmit() {
|
||||
if (isPossiblePhoneNumber(internalValue ?? '')) {
|
||||
if (
|
||||
internalValue === undefined ||
|
||||
isPossiblePhoneNumber(internalValue ?? '')
|
||||
) {
|
||||
onSubmit(internalValue ?? '');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user