feat: Add button to empty trash (#6772)

Co-authored-by: Tom Moor <tom.moor@gmail.com>
This commit is contained in:
Hemachandar
2024-04-16 18:34:56 +05:30
committed by GitHub
parent a5d2752122
commit ef0fb74308
11 changed files with 244 additions and 18 deletions

View File

@@ -61,7 +61,7 @@ export const CollectionForm = observer(function CollectionForm_({
React.useEffect(() => {
// If the user hasn't picked an icon yet, go ahead and suggest one based on
// the name of the collection. It's the little things sometimes.
if (!hasOpenedIconPicker) {
if (!hasOpenedIconPicker && !collection) {
setValue(
"icon",
IconLibrary.findIconByKeyword(values.name) ??
@@ -69,7 +69,7 @@ export const CollectionForm = observer(function CollectionForm_({
"collection"
);
}
}, [values.name]);
}, [values.name, collection]);
const handleIconPickerChange = React.useCallback(
(color: string, icon: string) => {