fix: input onchange event
This commit is contained in:
parent
e09baf9b6c
commit
c570c6a617
|
|
@ -10,7 +10,6 @@ type InputProps<TMultiline extends boolean> = {
|
|||
error?: string
|
||||
help?: React.ReactNode
|
||||
multiline?: TMultiline
|
||||
onChangeText?: (value: string) => void
|
||||
} & React.ComponentPropsWithRef<TMultiline extends true ? "textarea" : "input">
|
||||
|
||||
export const Input = forwardRef(function Input<
|
||||
|
|
@ -25,7 +24,6 @@ export const Input = forwardRef(function Input<
|
|||
error,
|
||||
help,
|
||||
multiline,
|
||||
onChangeText,
|
||||
...inputProps
|
||||
}: InputProps<TMutliline>,
|
||||
ref: TMutliline extends true
|
||||
|
|
@ -55,7 +53,6 @@ export const Input = forwardRef(function Input<
|
|||
isBlock && `is-block`,
|
||||
className,
|
||||
)}
|
||||
onChange={onChangeText}
|
||||
/>
|
||||
{addon && (
|
||||
<span className="flex items-center px-3 text-gray-600 bg-gray-50 h-10 border border-l-0 rounded-r-lg relative -z-10">
|
||||
|
|
|
|||
|
|
@ -36,9 +36,9 @@ export default function SettingsDomainsPage() {
|
|||
}
|
||||
|
||||
const [customDomain, setCustomDomain] = useState("")
|
||||
const customDomainChange = (e: any) => {
|
||||
setCustomDomain(e.target.value)
|
||||
}
|
||||
form.register("custom_domain", {
|
||||
onChange: (e) => setCustomDomain(e.target.value),
|
||||
})
|
||||
|
||||
useEffect(() => {
|
||||
if (updateSite.isSuccess) {
|
||||
|
|
@ -84,7 +84,6 @@ export default function SettingsDomainsPage() {
|
|||
id="custom_domain"
|
||||
label="Custom Domain"
|
||||
className="w-64"
|
||||
onChangeText={customDomainChange}
|
||||
{...form.register("custom_domain")}
|
||||
/>
|
||||
{customDomain && (
|
||||
|
|
|
|||
Loading…
Reference in New Issue