Skip to content

[Dropdown] Remote content prevents icon from triggering dropdown #4041

@nandastone

Description

@nandastone

This behaviour is observable in the documentation: http://semantic-ui.com/modules/dropdown.html#remote-content

To reproduce click the icon located in the right of the Dropdown before remote data has loaded. Nothing happens. Click anywhere else in the Dropdown to trigger the remote data load. Clicking the icon then works.

dropdown-remote-icon

The issue appears to be in the event handler for clicking the icon, which attempts to toggle the dropdown menu. This is prevented from happening if there are no child options or message in the dropdown, which is the case for a dropdown with remote data.

https://github.com/Semantic-Org/Semantic-UI/blob/2.1.8/src/definitions/modules/dropdown.js#L874-L879

I believe if the module.is.search() is true, it should work more like the text element handler:

https://github.com/Semantic-Org/Semantic-UI/blob/2.1.8/src/definitions/modules/dropdown.js#L880-L885

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions