mirror of
https://github.com/zadam/trilium.git
synced 2025-11-12 00:05:50 +01:00
chore(react/ribbon): working execute search button
This commit is contained in:
@@ -1,22 +1,26 @@
|
||||
interface FormTextAreaProps {
|
||||
import { TextareaHTMLAttributes } from "preact/compat";
|
||||
|
||||
interface FormTextAreaProps extends Omit<TextareaHTMLAttributes, "onBlur" | "onChange"> {
|
||||
id?: string;
|
||||
currentValue: string;
|
||||
onChange?(newValue: string): void;
|
||||
onBlur?(newValue: string): void;
|
||||
rows: number;
|
||||
className?: string;
|
||||
placeholder?: string;
|
||||
}
|
||||
export default function FormTextArea({ id, onBlur, rows, currentValue, className, placeholder }: FormTextAreaProps) {
|
||||
export default function FormTextArea({ id, onBlur, onChange, rows, currentValue, className, ...restProps }: FormTextAreaProps) {
|
||||
return (
|
||||
<textarea
|
||||
id={id}
|
||||
rows={rows}
|
||||
className={`form-control ${className ?? ""}`}
|
||||
onChange={(e) => {
|
||||
onChange?.(e.currentTarget.value);
|
||||
}}
|
||||
onBlur={(e) => {
|
||||
onBlur?.(e.currentTarget.value);
|
||||
}}
|
||||
style={{ width: "100%" }}
|
||||
placeholder={placeholder}
|
||||
{...restProps}
|
||||
>{currentValue}</textarea>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user