fomantic / Fomantic-UI

Fomantic-UI is the official community fork of Semantic-UI
https://fomantic-ui.com
MIT License
3.58k stars 333 forks source link

Dropdown Size Attribute Not Recognized #1152

Open RedGoneWILD opened 5 years ago

RedGoneWILD commented 5 years ago

Feature Request

The select tag has a size attribute that "Defines the number of visible options in a drop-down list". Fomantic UI does not recognize the size attribute, but should.

Description

I am looking to replicate a listbox essentially with Fomantic UI. Ideally, it would be fluid to fill out a grid column and always expanded, with a scrollbar for excess content. It could have a filter input like a search dropdown and filter the

Example

On page load, I am showing the dropdown and then I am returning false onHide to keep my very long fluid dropdown displayed on the page.

<select class="ui very long fluid selection dropdown" id="listUsersAdmin" size="20">
$('#listUsersAdmin').dropdown({
        duration: 0,
        onChange: function(val) {
            loadUserDetails(val);
        },
        onHide: function() {
            return false;
        }
    }).dropdown('show');

Screenshot

image

exoego commented 5 years ago

This sounds similar to #1132 where ol's start attribute is not recognized. IIUC, we can vary height of dropdown based on size attribute if CSS supports type in attr function like attr(size integer). https://github.com/fomantic/Fomantic-UI/issues/1132#issuecomment-547375870

lubber-de commented 5 years ago

Related SUI issue https://github.com/Semantic-Org/Semantic-UI/issues/6178