Set chatSidebar prompt, Setting name fields to empty str if value null

TextArea and Input field values cannot be null.
This commit is contained in:
Debanjum
2025-04-09 10:23:23 +05:30
parent aea7b90fec
commit 2935ea52cf
2 changed files with 2 additions and 2 deletions

View File

@@ -502,7 +502,7 @@ function ChatSidebarInternal({ ...props }: ChatSideBarProps) {
<SidebarMenuItem className="list-none">
<Textarea
className="w-full h-32 resize-none hover:resize-y"
value={customPrompt}
value={customPrompt || ""}
onChange={(e) => handleCustomPromptChange(e.target.value)}
readOnly={!isEditable}
disabled={!isEditable} />

View File

@@ -746,7 +746,7 @@ export default function SettingsView() {
<Input
type="text"
onChange={(e) => setName(e.target.value)}
value={name}
value={name || ""}
className="w-full border border-gray-300 rounded-lg p-4 py-6"
/>
</CardContent>