visualforce-typeahead icon indicating copy to clipboard operation
visualforce-typeahead copied to clipboard

Bug when only destination for ID and not value is defined

Open sd5000 opened this issue 10 years ago • 2 comments

Found a little bug, I think. When invoking the component I only had the destinationForSelectedId attribute defined and did not have destinationForSelectedValue defined. That used to work fine but at some point must have stopped working. It was bonking on line 137 in Typeahead.component, throwing the error "Syntax error, unrecognized expression: [id$=]" due to the blank destinationForSelectedValue attribute:

135 // if destinations are defined, set them too 136 j$('[id$={!destinationForSelectedId}]').val( id ); 137 j$('[id$={!destinationForSelectedValue}]').val( value );

I fixed my issue by adding the destinationForSelectedValue attribute to the component call but wanted to let you know. Can't quite figure out why it used to work and stopped at some point.

sd5000 avatar Apr 07 '15 19:04 sd5000

Thanks! If you are interested in making a pull request with the fix we can review it and get it merged, otherwise we will take a look. @groundwired

dextermilo avatar Apr 08 '15 19:04 dextermilo

Sorry I meant the fix was in my markup, not in your code.

sd5000 avatar Apr 08 '15 19:04 sd5000