From 5ce334d807414b043172098fe37ce62820d6bfbe Mon Sep 17 00:00:00 2001 From: yangdx Date: Mon, 14 Apr 2025 14:45:37 +0800 Subject: [PATCH] Fix tooltips missing for editable properties --- .../src/components/graph/EditablePropertyRow.tsx | 10 ++++++++-- lightrag_webui/src/components/graph/PropertiesView.tsx | 1 + .../src/components/graph/PropertyRowComponents.tsx | 4 +++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/lightrag_webui/src/components/graph/EditablePropertyRow.tsx b/lightrag_webui/src/components/graph/EditablePropertyRow.tsx index a8e84fce..7199b6ab 100644 --- a/lightrag_webui/src/components/graph/EditablePropertyRow.tsx +++ b/lightrag_webui/src/components/graph/EditablePropertyRow.tsx @@ -19,6 +19,7 @@ interface EditablePropertyRowProps { targetId?: string // Target node ID (for edge type) onValueChange?: (newValue: any) => void // Optional callback when value changes isEditable?: boolean // Whether this property can be edited + tooltip?: string // Optional tooltip to display on hover } /** @@ -34,7 +35,8 @@ const EditablePropertyRow = ({ sourceId, targetId, onValueChange, - isEditable = false + isEditable = false, + tooltip }: EditablePropertyRowProps) => { const { t } = useTranslation() const [isEditing, setIsEditing] = useState(false) @@ -101,7 +103,11 @@ const EditablePropertyRow = ({
: - + ) } diff --git a/lightrag_webui/src/components/graph/PropertyRowComponents.tsx b/lightrag_webui/src/components/graph/PropertyRowComponents.tsx index d0c280d9..5ffaf7b6 100644 --- a/lightrag_webui/src/components/graph/PropertyRowComponents.tsx +++ b/lightrag_webui/src/components/graph/PropertyRowComponents.tsx @@ -38,14 +38,16 @@ export const EditIcon = ({ onClick }: EditIconProps) => ( interface PropertyValueProps { value: any onClick?: () => void + tooltip?: string } -export const PropertyValue = ({ value, onClick }: PropertyValueProps) => ( +export const PropertyValue = ({ value, onClick, tooltip }: PropertyValueProps) => (