mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-08-12 17:49:01 +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 = () => {
|
const handleInputConfirm = () => {
|
||||||
if (inputValue && tags?.indexOf(inputValue) === -1) {
|
if (inputValue && tags) {
|
||||||
setTags?.([...tags, inputValue]);
|
const newTags = inputValue
|
||||||
|
.split(';')
|
||||||
|
.map((tag) => tag.trim())
|
||||||
|
.filter((tag) => tag && !tags.includes(tag));
|
||||||
|
setTags?.([...tags, ...newTags]);
|
||||||
}
|
}
|
||||||
setInputVisible(false);
|
setInputVisible(false);
|
||||||
setInputValue('');
|
setInputValue('');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user