fix: truncate text on @ filter selector on chat (#133)
* Added truncation on name and description for knowledge filters * fixed selected filter not truncating right
This commit is contained in:
parent
2924a5d52d
commit
26023ab244
1 changed files with 6 additions and 4 deletions
|
|
@ -2344,12 +2344,14 @@ function ChatPage() {
|
||||||
<button
|
<button
|
||||||
key={filter.id}
|
key={filter.id}
|
||||||
onClick={() => handleFilterSelect(filter)}
|
onClick={() => handleFilterSelect(filter)}
|
||||||
className={`w-full text-left px-2 py-2 text-sm rounded hover:bg-muted/50 flex items-center justify-between ${
|
className={`w-full overflow-hidden text-left px-2 py-2 gap-2 text-sm rounded hover:bg-muted/50 flex items-center justify-between ${
|
||||||
index === selectedFilterIndex ? "bg-muted/50" : ""
|
index === selectedFilterIndex ? "bg-muted/50" : ""
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
<div>
|
<div className="overflow-hidden">
|
||||||
<div className="font-medium">{filter.name}</div>
|
<div className="font-medium truncate">
|
||||||
|
{filter.name}
|
||||||
|
</div>
|
||||||
{filter.description && (
|
{filter.description && (
|
||||||
<div className="text-xs text-muted-foreground truncate">
|
<div className="text-xs text-muted-foreground truncate">
|
||||||
{filter.description}
|
{filter.description}
|
||||||
|
|
@ -2357,7 +2359,7 @@ function ChatPage() {
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
{selectedFilter?.id === filter.id && (
|
{selectedFilter?.id === filter.id && (
|
||||||
<div className="w-2 h-2 rounded-full bg-blue-500" />
|
<div className="w-2 h-2 shrink-0 rounded-full bg-blue-500" />
|
||||||
)}
|
)}
|
||||||
</button>
|
</button>
|
||||||
))}
|
))}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue