tags, folder rename, other stuff
This commit is contained in:
@@ -438,6 +438,7 @@ const SkeuomorphicWorkspace = ({
|
||||
onRemoveTagFromDocument = null,
|
||||
ensureAssetUrl = null,
|
||||
getDocumentAsset = () => null,
|
||||
prepareTagPayload = null,
|
||||
}) => {
|
||||
const items = useMemo(() => (searchResults ? searchResults : documents), [documents, searchResults]);
|
||||
const showingSearchResults = searchResults !== null;
|
||||
@@ -1732,7 +1733,11 @@ const SkeuomorphicWorkspace = ({
|
||||
return;
|
||||
}
|
||||
try {
|
||||
await onCreateTag({ label, color: generateRandomTagColor() });
|
||||
const payload =
|
||||
typeof prepareTagPayload === 'function'
|
||||
? prepareTagPayload({ label })
|
||||
: { label, color: generateRandomTagColor() };
|
||||
await onCreateTag(payload);
|
||||
setActiveShelfTagId(null);
|
||||
} catch (error) {
|
||||
console.error('Failed to create tag', error);
|
||||
|
||||
Reference in New Issue
Block a user