fix(Index.tsx): simplify tag input handling to accept single string input
This commit is contained in:
@@ -2351,8 +2351,7 @@ $current`);
|
||||
type="text"
|
||||
value={(previousNote.tags || []).join(', ')}
|
||||
onChange={(e) => {
|
||||
const tags = e.target.value.split(',').map(tag => tag.trim()).filter(tag => tag.length > 0);
|
||||
const updatedNote = { ...previousNote, tags };
|
||||
const updatedNote = { ...previousNote, tags: [e.target.value] };
|
||||
setPreviousNote(updatedNote);
|
||||
setIsPreviousNoteModified(true);
|
||||
}}
|
||||
@@ -2421,8 +2420,7 @@ $current`);
|
||||
type="text"
|
||||
value={currentNoteTags.join(', ')}
|
||||
onChange={(e) => {
|
||||
const tags = e.target.value.split(',').map(tag => tag.trim()).filter(tag => tag.length > 0);
|
||||
setCurrentNoteTags(tags);
|
||||
setCurrentNoteTags([e.target.value]);
|
||||
}}
|
||||
className={`flex-1 border-0 bg-transparent ${getTextClass('base')} p-0 outline-none`}
|
||||
/>
|
||||
|
Reference in New Issue
Block a user