mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-23 01:50:12 +01:00
This commit is contained in:
parent
6f39936bb0
commit
1a2bc5208e
1 changed files with 15 additions and 0 deletions
|
|
@ -121,6 +121,21 @@ export const setColOption = (protyle: IProtyle, data: IAV, target: HTMLElement,
|
||||||
if (name === inputElement.value || !inputElement.value) {
|
if (name === inputElement.value || !inputElement.value) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
let hasName = false
|
||||||
|
data.view.columns.find(column => {
|
||||||
|
if (column.id === colId) {
|
||||||
|
column.options.find((item) => {
|
||||||
|
if (item.name === inputElement.value) {
|
||||||
|
hasName = true;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (hasName) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
transaction(protyle, [{
|
transaction(protyle, [{
|
||||||
action: "updateAttrViewColOption",
|
action: "updateAttrViewColOption",
|
||||||
id: colId,
|
id: colId,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue