Skip to content
This repository was archived by the owner on Oct 8, 2021. It is now read-only.
This repository was archived by the owner on Oct 8, 2021. It is now read-only.

Listview with initially hidden items no longer works #4539

@row1

Description

@row1

If the items in the list view are initially hidden then they will not get displayed when the user types in the search filter. Items will only start getting displayed when the user presses the backspace key. I would like the list to have no visible items until the user enters a search filter.

This previously worked in jQuery Mobile 1.0: http://jsfiddle.net/ULXbb/3/
It no longer works in jQuery Mobile 1.1 (type ac and then press backspace): http://jsfiddle.net/UHtAG/1/

The if/else block on line 5818 now explicitly checks ignores items that have the class ui-screen-hidden, so in my case it will never find any times to display.

            if ( val.length < lastval.length || val.indexOf(lastval) !== 0 ) {

                // Removed chars or pasted something totally different, check all items
                listItems = list.children();
            } else {

                // Only chars added, not removed, only use visible subset
                listItems = list.children( ":not(.ui-screen-hidden)" );
            }

If if replace the entire if/else block with listItems = list.children(); then it works.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions