mirror of
https://github.com/zadam/trilium.git
synced 2025-11-17 18:50:41 +01:00
chore(react/collections/board): ignore empty titles
This commit is contained in:
@@ -242,7 +242,7 @@ export function TitleEditor({ currentValue, placeholder, save, dismiss, multilin
|
|||||||
onKeyDown={(e) => {
|
onKeyDown={(e) => {
|
||||||
if (e.key === "Enter") {
|
if (e.key === "Enter") {
|
||||||
const newValue = e.currentTarget.value;
|
const newValue = e.currentTarget.value;
|
||||||
if (newValue !== currentValue || isNewItem) {
|
if (newValue.trim() && (newValue !== currentValue || isNewItem)) {
|
||||||
save(newValue);
|
save(newValue);
|
||||||
}
|
}
|
||||||
dismiss();
|
dismiss();
|
||||||
@@ -253,7 +253,7 @@ export function TitleEditor({ currentValue, placeholder, save, dismiss, multilin
|
|||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
onBlur={(newValue) => {
|
onBlur={(newValue) => {
|
||||||
if (newValue !== currentValue || isNewItem) {
|
if (newValue.trim() && (newValue !== currentValue || isNewItem)) {
|
||||||
save(newValue);
|
save(newValue);
|
||||||
}
|
}
|
||||||
dismiss();
|
dismiss();
|
||||||
|
|||||||
Reference in New Issue
Block a user