made search off working

This commit is contained in:
Salijoghli 2025-09-02 13:01:05 +04:00
parent e1ba03589d
commit 2dbd0ca691
2 changed files with 9 additions and 3 deletions

View File

@ -318,7 +318,7 @@
"component": { "component": {
"onActionPerformed": { "onActionPerformed": {
"config": { "config": {
"script": "\tself.session.custom.searchId \u003d \"\"\n\tself.session.custom.deviceSearchId \u003d \"\"\n\tsystem.perspective.closePopup(id \u003d \"Search\")" "script": "\tsystem.perspective.closePopup(id \u003d \"Search\")\n\tsystem.perspective.navigate(\n\t view\u003dself.page.props.primaryView,\n\t params\u003d{\"highlightTagPath\": \"CLEAR\"}\n\t)"
}, },
"scope": "G", "scope": "G",
"type": "script" "type": "script"

View File

@ -1,8 +1,14 @@
def handleTagHighlight(view, currentValue): def handleTagHighlight(view, currentValue):
tag_priority = currentValue.value tag_priority = currentValue.value
if tag_priority == None: # --- CASE 1: Remove all highlights by applying CLEAR class ---
return if not tag_priority or str(tag_priority).upper() == "CLEAR":
for child in view.rootContainer.getChildren()[0].getChildren():
try:
child.props.style.classes = ""
except:
pass
return False
parts = str(tag_priority).split("||") parts = str(tag_priority).split("||")
tag = parts[0] tag = parts[0]