Bug Tracker

Modify

Ticket #12198 (closed bug: invalid)

Opened 10 months ago

Last modified 5 months ago

AutoComplete " Cannot read property 'label' of null"

Reported by: nauman.qazi@… Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.8b1
Keywords: Cc:
Blocking: Blocked by:

Description

Hello, I am using jQuery UI 1.8.18 so i can use autocomplete function. It works fine but at times, it throws excpetion from following method ,(line 6668)

$.extend( $.ui.autocomplete, {
	escapeRegex: function( value ) {
		return value.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
	},
	filter: function(array, term) {
		var matcher = new RegExp( $.ui.autocomplete.escapeRegex(term), "i" );
		return $.grep( array, function(value) {
			return matcher.test( /*value.label || value.value || */ value );//exception is here if i uncomment
		});
	}
});

Exception is " Cannot read property 'label' of null". As you can see that I have commented out the value.label and value.value for timebeing, it seems to be working fine.

Yet I am unclear of two things 1 - Why is this error happen some textboxes and not on others? 2 - Is it already fixed in new UI versions?

Thanks

Change History

comment:1 Changed 10 months ago by mikesherov

  • Status changed from new to closed
  • Resolution set to invalid

Please file bugs with jquery-ui against the jquery-ui bug tracker:  http://bugs.jqueryui.com/

comment:2 Changed 5 months ago by anonymous

I had the same issue, and the solution is avoid including 'null' data into the data source list.

comment:3 Changed 5 months ago by Immanuel

I had the same issue, and the solution is avoid including 'null' data into the data source list.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.