File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
apps/sim/app/workspace/[workspaceId]/knowledge/[id] Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -1189,6 +1189,14 @@ export function KnowledgeBase({
11891189 ) : (
11901190 < h1
11911191 className = { `font-medium text-[18px] text-[var(--text-primary)] ${ userPermissions . canEdit ? 'cursor-text' : '' } ` }
1192+ onMouseDown = {
1193+ isEditingDescription && userPermissions . canEdit
1194+ ? ( e ) => e . preventDefault ( )
1195+ : undefined
1196+ }
1197+ onClick = {
1198+ isEditingDescription && userPermissions . canEdit ? handleStartEditName : undefined
1199+ }
11921200 onDoubleClick = { userPermissions . canEdit ? handleStartEditName : undefined }
11931201 >
11941202 { knowledgeBaseName }
@@ -1250,14 +1258,21 @@ export function KnowledgeBase({
12501258 ) : knowledgeBase ?. description ? (
12511259 < p
12521260 className = { `mt-[4px] line-clamp-2 max-w-[40vw] font-medium text-[14px] text-[var(--text-tertiary)] ${ userPermissions . canEdit ? 'cursor-text' : '' } ` }
1261+ onMouseDown = {
1262+ isEditingName && userPermissions . canEdit ? ( e ) => e . preventDefault ( ) : undefined
1263+ }
1264+ onClick = {
1265+ isEditingName && userPermissions . canEdit ? handleStartEditDescription : undefined
1266+ }
12531267 onDoubleClick = { userPermissions . canEdit ? handleStartEditDescription : undefined }
12541268 >
12551269 { knowledgeBase . description }
12561270 </ p >
12571271 ) : isEditingName && userPermissions . canEdit ? (
12581272 < p
12591273 className = 'mt-[4px] cursor-text font-medium text-[14px] text-[var(--text-muted)] transition-colors hover:text-[var(--text-tertiary)]'
1260- onDoubleClick = { handleStartEditDescription }
1274+ onMouseDown = { ( e ) => e . preventDefault ( ) }
1275+ onClick = { handleStartEditDescription }
12611276 >
12621277 Add a description...
12631278 </ p >
You can’t perform that action at this time.
0 commit comments