Quantcast
Channel: jQuery Library for SharePoint Web Services
Viewing all articles
Browse latest Browse all 6517

Commented Unassigned: Inconsistency between Simple and Complex in SPFilterDropdown [10157]

$
0
0
This is in both SPFilterDropdown and SPCascadeDropdowns. The behavior between a simple and complex dropdown if different for picking the selected option.

For a simple dropdown it uses $(this).attr("ows_ID") to decide the selected option.
```
var selected = ($(this).attr("ows_ID") === columnSelectSelected[0]) ? " selected='selected'" : "";
```

For a complex (and Multi) it uses the variable "thisOptionId" to decide the selected option.
```
if(thisOptionId === columnSelectSelected[0]) {
.Obj.attr("value", thisOptionValue);
}
```

In the case where thisOptionId != $(this).attr("ows_ID") you get different behavior. For my purposes it would be great if the simple case also used "thisOptionId".

thanks
Ben
Comments: It happens in the case that the relationshipListColumn is a Lookup column. Its something that we do a lot of in our deployments. Your comment in the code: > If relationshipListColumn is a Lookup column, then the ID should be for the Lookup value, else the ID of the relationshipList item This is only happening for complex or multipick dropdowns. ``` var thisOptionId, thisOptionValue; // If relationshipListColumn is a Lookup column, then the ID should be for the Lookup value, // else the ID of the relationshipList item var thisValue = $(this).attr("ows_" + opt.relationshipListColumn); if(thisValue !== undefined && thisValue.indexOf(";#") > 0) { var splitValue = thisValue.split(";#"); thisOptionId = splitValue[0]; thisOptionValue = splitValue[1]; } else { thisOptionId = $(this).attr("ows_ID"); thisOptionValue = thisValue; } ```

Viewing all articles
Browse latest Browse all 6517

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>