mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-30 13:28:48 +01:00
🎨 Improve adding rows of the sorted database table view https://github.com/siyuan-note/siyuan/issues/10099
This commit is contained in:
parent
737839f6bb
commit
c7d5fddb97
2 changed files with 47 additions and 8 deletions
|
|
@ -139,6 +139,23 @@ func (filter *ViewFilter) GetAffectValue(key *Key) (ret *Value) {
|
|||
case FilterOperatorIsNotEmpty:
|
||||
ret.Date = &ValueDate{Content: util.CurrentTimeMillis(), IsNotEmpty: true}
|
||||
}
|
||||
case KeyTypeSelect:
|
||||
switch filter.Operator {
|
||||
case FilterOperatorIsEqual:
|
||||
if 0 < len(filter.Value.MSelect) {
|
||||
ret.MSelect = []*ValueSelect{{Content: filter.Value.MSelect[0].Content, Color: filter.Value.MSelect[0].Color}}
|
||||
}
|
||||
case FilterOperatorIsNotEqual:
|
||||
if 0 < len(filter.Value.MSelect) {
|
||||
ret.MSelect = []*ValueSelect{{Content: filter.Value.MSelect[0].Content + " Untitled", Color: "1"}}
|
||||
}
|
||||
case FilterOperatorIsEmpty:
|
||||
ret.MSelect = []*ValueSelect{}
|
||||
case FilterOperatorIsNotEmpty:
|
||||
if 0 < len(key.Options) {
|
||||
ret.MSelect = []*ValueSelect{{Content: key.Options[0].Name, Color: key.Options[0].Color}}
|
||||
}
|
||||
}
|
||||
case KeyTypeMSelect:
|
||||
switch filter.Operator {
|
||||
case FilterOperatorIsEqual, FilterOperatorContains:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue