This is an automated email from the ASF dual-hosted git repository.

carlosrovira pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git


The following commit(s) were added to refs/heads/develop by this push:
     new a28c19b  make icon renderer remove the list item as in Table example
a28c19b is described below

commit a28c19bc8a8e835af4d1559c0d2501007a83f89e
Author: Carlos Rovira <[email protected]>
AuthorDate: Wed Aug 29 09:58:18 2018 +0200

    make icon renderer remove the list item as in Table example
---
 .../src/main/royale/itemRenderers/IconListItemRenderer.mxml    | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git 
a/examples/royale/JewelExample/src/main/royale/itemRenderers/IconListItemRenderer.mxml
 
b/examples/royale/JewelExample/src/main/royale/itemRenderers/IconListItemRenderer.mxml
index 36e2c97..0f14474 100644
--- 
a/examples/royale/JewelExample/src/main/royale/itemRenderers/IconListItemRenderer.mxml
+++ 
b/examples/royale/JewelExample/src/main/royale/itemRenderers/IconListItemRenderer.mxml
@@ -26,12 +26,20 @@ limitations under the License.
     <fx:Script>
                <![CDATA[
                        import vos.IconListVO;
+                       import org.apache.royale.jewel.List;
+                       import org.apache.royale.collections.ArrayList;
             
             [Bindable("dataChange")]
             public function get iconList():IconListVO
             {
                 return data as IconListVO;
             }
+
+            private function clickCloseButton():void
+                       {
+                var list:List = itemRendererParent as List;
+                (list.dataProvider as ArrayList).removeItemAt(index);
+            }
                ]]>
        </fx:Script>
 
@@ -39,7 +47,7 @@ limitations under the License.
         <js:ItemRendererDataBinding />
     </j:beads>
     
-    <js:FontIcon text="{iconList.icon}" material="true" 
visible="{iconList.icon != null}"/>
+    <js:FontIcon text="{iconList.icon}" material="true" 
visible="{iconList.icon != null}" click="clickCloseButton()"/>
 
     <html:Span text="{iconList.label}"/>
     

Reply via email to