mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-08-12 12:29:02 +08:00
Allows quick entry of entities separated by commas (#3914)
Allows quick entry of entities separated by commas ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
parent
3e134ac0ad
commit
5fe0791684
@ -37,8 +37,12 @@ const EditTag = ({ tags, setTags }: EditTagsProps) => {
|
||||
};
|
||||
|
||||
const handleInputConfirm = () => {
|
||||
if (inputValue && tags?.indexOf(inputValue) === -1) {
|
||||
setTags?.([...tags, inputValue]);
|
||||
if (inputValue && tags) {
|
||||
const newTags = inputValue
|
||||
.split(';')
|
||||
.map((tag) => tag.trim())
|
||||
.filter((tag) => tag && !tags.includes(tag));
|
||||
setTags?.([...tags, ...newTags]);
|
||||
}
|
||||
setInputVisible(false);
|
||||
setInputValue('');
|
||||
|
Loading…
x
Reference in New Issue
Block a user