mirror of
https://github.com/TriliumNext/Trilium.git
synced 2025-12-11 05:45:26 -06:00
chore(react/collections/board): ignore empty titles
This commit is contained in:
parent
b361cc0630
commit
d908a1b0d2
@ -242,7 +242,7 @@ export function TitleEditor({ currentValue, placeholder, save, dismiss, multilin
|
||||
onKeyDown={(e) => {
|
||||
if (e.key === "Enter") {
|
||||
const newValue = e.currentTarget.value;
|
||||
if (newValue !== currentValue || isNewItem) {
|
||||
if (newValue.trim() && (newValue !== currentValue || isNewItem)) {
|
||||
save(newValue);
|
||||
}
|
||||
dismiss();
|
||||
@ -253,7 +253,7 @@ export function TitleEditor({ currentValue, placeholder, save, dismiss, multilin
|
||||
}
|
||||
}}
|
||||
onBlur={(newValue) => {
|
||||
if (newValue !== currentValue || isNewItem) {
|
||||
if (newValue.trim() && (newValue !== currentValue || isNewItem)) {
|
||||
save(newValue);
|
||||
}
|
||||
dismiss();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user