Opened 10 years ago

Last modified 7 years ago

#4782 open feature

Selectable: Filtered items does not refresh

Reported by: ungenio Owned by:
Priority: minor Milestone: 2.0.0
Component: ui.selectable Version: 1.7.2
Keywords: filter selectees Cc:
Blocked by: Blocking:

Description

I've created a selectable as follows:

$('ul.selectable').selectable({
	filter: 'li:not(.ui-state-disabled)'
});

If I add the "ui-state-disabled" class to one of the selectees at a later time, the selectee exhibits strange behavior, like being able to be selected but not unselected, rather than being filtered completely as expected.

To work around this, I've had to do something similar to the following:

$('ul.selectable li.ui-state-disabled').each(function(){
	$.removeData(this, 'selectable-item');
	$(this).removeClass('ui-selected ui-selectee');
});

I would think refresh ought to perform this on selectees that now match the filter expression.

Change History (4)

comment:1 Changed 10 years ago by Jörn Zaefferer

Milestone: TBD1.8

comment:2 Changed 7 years ago by Scott González

Type: enhancementfeature

comment:3 Changed 7 years ago by Scott González

Milestone: 1.9.02.0.0

comment:4 Changed 7 years ago by petersendidit

Status: newopen
Summary: Filtered items does not refreshSelectable: Filtered items does not refresh
Note: See TracTickets for help on using tickets.