[ https://issues.apache.org/jira/browse/FLEX-23973?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13447416#comment-13447416 ]
Judah Frangipane commented on FLEX-23973: ----------------------------------------- Here is an example patch up for discussion. It would look something like this: BEFORE: /** * @private */ override protected function itemShowingCaret(index:int, showsCaret:Boolean):void { super.itemShowingCaret(index, showsCaret); var renderer:Object = dataGroup ? dataGroup.getElementAt(index) : null; if (renderer is IItemRenderer) { IItemRenderer(renderer).showsCaret = showsCaret; // line 1395 (in SDK 4.6) } } AFTER: /** * @private */ override protected function itemShowingCaret(index:int, showsCaret:Boolean):void { super.itemShowingCaret(index, showsCaret); var renderer:Object = dataGroup ? dataGroup.getElementAt(index) : null; if (renderer is IItemRenderer) { IItemRenderer(renderer).showsCaret = showCaret ? showsCaret : false ; // line 1395 (in SDK 4.6) } } SHOW CARET property /** * @private * Storage for the showCaret property. */ private var _showCaret:Boolean = true; [Inspectable(defaultValue="true")] /** * A flag that indicates whether to show the caret. * * @default true * * @langversion 3.0 * @playerversion Flash 10 * @playerversion AIR 1.5 * @productversion Flex 4.8 */ public function get showCaret():Boolean { return _showCaret; } /** * @private */ public function set showCaret(value:Boolean):void { if (value == _showCaret) return; _showCaret = value; // invalidate item renderers } > showsCaret does not hide caret from custom List ItemRenderer > ------------------------------------------------------------ > > Key: FLEX-23973 > URL: https://issues.apache.org/jira/browse/FLEX-23973 > Project: Apache Flex > Issue Type: Bug > Components: Spark: List > Affects Versions: Adobe Flex SDK 4.1 (Release) > Environment: Affected OS(s): All OS Platforms > Browser: Firefox 3.x > Language Found: English > Reporter: Adobe JIRA > Assignee: Adobe JIRA > > Steps to reproduce: > 1. Create a spark list with a custom item renderer. Use the following as the > item renderer. > <?xml version="1.0" encoding="utf-8"?> > <s:ItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009" > xmlns:s="library://ns.adobe.com/flex/spark" > xmlns:mx="library://ns.adobe.com/flex/mx" > autoDrawBackground="true" width="100%" > height="50" > depth="0" depth.hovered="1" > showsCaret="false"> > <s:states> > <s:State name="normal" /> > <s:State name="hovered" /> > </s:states> > > <s:transitions> > <s:Transition fromState="normal" toState="hovered" > autoReverse="true"> > <s:Parallel> > <s:Rotate3D target="{group}" angleXFrom="0" > angleXTo="0" angleZFrom="0" autoCenterTransform="true" angleYTo="360" > angleYFrom="0" autoCenterProjection="true" angleZTo="0"/> > </s:Parallel> > </s:Transition> > </s:transitions> > > > <s:VGroup id="group" height="100%" width="100%"> > <s:HGroup width="100%" height="100%" verticalAlign="middle"> > <s:Label text="{data.show}" /> > <s:Label text="{data.displayName}"/> > </s:HGroup> > </s:VGroup> > > </s:ItemRenderer> > 2. In the List deselect any item by setting selectedItem=-1 when an item is > selected. > With appropriate data, compile the application and render the list. > 3. Hover the mouse over an item and select an item. > 4. > > Actual Results: > > When the item gets deselected the caret remains. > > Expected Results: > Caret should not be visible since showsCaret is set as false. > > > Workaround (if any): > > None known -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira