Comment 0 for bug 1336945

Revision history for this message
Nicholas Skaggs (nskaggs) wrote : ActionSelectionPopover doesn't close automatically

A popover should close automatically after selecting an option. This is not working currently. See this example and notice the popover stays on the screen even after you select an option.

-----------
import QtQuick 2.0
import Ubuntu.Components 0.1
import Ubuntu.Components.Popups 0.1
import Ubuntu.Components.ListItems 0.1 as ListItems

MainView {
    width: units.gu(48)
    height: units.gu(60)

    Button {
        objectName: "open_popover"
        text: "Open Popover"
        onClicked: testActionsPopover.show();
    }

    Label {
        id: "label"
        objectName: "clicked_label"
        anchors.centerIn: parent
        text: "Action not selected."
    }

    ActionSelectionPopover {
        objectName: "test_actions_popover"
        id: testActionsPopover
        delegate: ListItems.Standard {
          text: action.text
          objectName: action.objectName
        }
        actions: ActionList {
            Action {
                objectName: "action_one"
                text: "Action one"
                onTriggered: label.text = "Action one selected."
            }
            Action {
                objectName: "action_two"
                text: "Action two"
                onTriggered: label.text = "Action two selected."
            }

        }
    }
}