mirror of
https://github.com/zadam/trilium.git
synced 2025-11-12 00:05:50 +01:00
chore(react/ribbon): handle search error
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { TextareaHTMLAttributes } from "preact/compat";
|
||||
import { RefObject, TextareaHTMLAttributes } from "preact/compat";
|
||||
|
||||
interface FormTextAreaProps extends Omit<TextareaHTMLAttributes, "onBlur" | "onChange"> {
|
||||
id?: string;
|
||||
@@ -6,10 +6,12 @@ interface FormTextAreaProps extends Omit<TextareaHTMLAttributes, "onBlur" | "onC
|
||||
onChange?(newValue: string): void;
|
||||
onBlur?(newValue: string): void;
|
||||
rows: number;
|
||||
inputRef?: RefObject<HTMLTextAreaElement>
|
||||
}
|
||||
export default function FormTextArea({ id, onBlur, onChange, rows, currentValue, className, ...restProps }: FormTextAreaProps) {
|
||||
export default function FormTextArea({ inputRef, id, onBlur, onChange, rows, currentValue, className, ...restProps }: FormTextAreaProps) {
|
||||
return (
|
||||
<textarea
|
||||
ref={inputRef}
|
||||
id={id}
|
||||
rows={rows}
|
||||
className={`form-control ${className ?? ""}`}
|
||||
|
||||
@@ -519,7 +519,8 @@ export function useTooltip(elRef: RefObject<HTMLElement>, config: Partial<Toolti
|
||||
if (!elRef?.current) return;
|
||||
|
||||
const $el = $(elRef.current);
|
||||
$el.tooltip(config);
|
||||
$el.tooltip("dispose");
|
||||
$el.tooltip(config);
|
||||
}, [ elRef, config ]);
|
||||
|
||||
const showTooltip = useCallback(() => {
|
||||
@@ -527,7 +528,8 @@ export function useTooltip(elRef: RefObject<HTMLElement>, config: Partial<Toolti
|
||||
|
||||
const $el = $(elRef.current);
|
||||
$el.tooltip("show");
|
||||
}, [ elRef ]);
|
||||
console.log("Show tooltip ", elRef.current);
|
||||
}, [ elRef, config ]);
|
||||
|
||||
const hideTooltip = useCallback(() => {
|
||||
if (!elRef?.current) return;
|
||||
|
||||
Reference in New Issue
Block a user