use global modal for popup messages
All checks were successful
delpoy / build-and-deploy (push) Successful in 51s
All checks were successful
delpoy / build-and-deploy (push) Successful in 51s
This commit is contained in:
@@ -63,14 +63,14 @@
|
||||
value = searchSuggestion.value;
|
||||
searchSuggestions = [];
|
||||
e.currentTarget.setCustomValidity('');
|
||||
onsubmit && onsubmit(Object.assign(e, { input: inputValue, value: value }));
|
||||
onsubmit?.(Object.assign(e, { input: inputValue, value: value }));
|
||||
} else if (inputValue === '' && emptyAllowed) {
|
||||
onsubmit && onsubmit(Object.assign(e, { input: '', value: '' }));
|
||||
onsubmit?.(Object.assign(e, { input: '', value: '' }));
|
||||
}
|
||||
});
|
||||
}}
|
||||
oninvalid={(e: Event & { currentTarget: EventTarget & HTMLInputElement }) => {
|
||||
invalidMessage && e.currentTarget.setCustomValidity(invalidMessage);
|
||||
if (invalidMessage) e.currentTarget.setCustomValidity(invalidMessage);
|
||||
}}
|
||||
pattern={suggestionRequired
|
||||
? `${value ? inputValue : 'a^' + (emptyAllowed ? '|$^' : '')}`
|
||||
@@ -89,7 +89,7 @@
|
||||
inputValue = searchSuggestion.name;
|
||||
value = searchSuggestion.value;
|
||||
searchSuggestions = [];
|
||||
onsubmit && onsubmit(Object.assign(e, { input: inputValue, value: value }));
|
||||
onsubmit?.(Object.assign(e, { input: inputValue, value: value }));
|
||||
}}>{searchSuggestion.name}</button
|
||||
>
|
||||
</li>
|
||||
|
||||
Reference in New Issue
Block a user