Predix_Logo
  • Categories
    • Questions
    • Predix | Updates
      • Pricing
      • Product
    • Deloitte - Private
    • How-To
    • Accenture-Private
  • Explore
    • Topics
    • Questions
    • Articles
    • Feedback or Feature Requests
  • Sign in
  • Home /
  • Questions /
avatar image
0
Question by Csanad.Poda@ge.com · Oct 18, 2018 at 08:09 AM · px

px-accordion event contents

The question is twofold. I have an element like this:

 <dom-module id="sw-address-details">
 
   <template>
     <style include="sw-address-details-styles"></style>
 
     <px-card hide-header="true">
       <px-accordion-group>
         <px-accordion
           header-value="[[addressHeader]]"
           on-px-accordion-expanded="expandAccordion"
           opened="true"
           icons='{"more":"px-utl:chevron-right","less":"px-utl:chevron","action":[{"icon":"px-utl:delete"}]}'
           show-action>
           <sw-address-element language="[[language]]" initial-header-value="{{addressHeader}}"></sw-address-element>
         </px-accordion>
       </px-accordion-group>
     </px-card>
 
   </template>
 
   <script src='../js/sw-scroll-into-view-es6.js'></script>
   <script src="../js/sw-address-details-es6.js"></script>
 </dom-module>

First of all, according to the documentation, px-accordion-action-clicked is fired when one clicks the action. But, how do I know which icon is being clicked? I tried checking the returned event but that had no indication on whether the delete or edit icons have been clicked.

Second of all, I'd expect the event returned by the px-accordion-action-clicked would contain the target of the accordion, however in fact it bubbles up all the way and event.target refers to the sw-address-details. Basically I'd like to catch the event when the delete icon is pressed specifically (but not the edit icon) and .remove() the px-accordion element, not the whole sw-address-details element. How can i do this?

Comment
Add comment
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

0 Replies

  • Sort: 

Follow this Question

Answers Answers and Comments

92 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Is it possible to hide the input box associated with the px-slider? 1 Answer

Why are custom polymer elements not being loaded when deployed to Predix? Works fine on local... 2 Answers

px-app-nav; routes names blink while collapsing px-app-nav 2 Answers

How I can use px-data-grid especially selection-mode="multi 1 Answer

px-rangepicker date limit 1 Answer

GE Monogram
  • Legal
  • Cookies
  • Forum Terms
  • Contact Us
  • Copyright © 2017 General Electric Company. All rights reserved.


Enterprise
Social Q&A

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Create an article
  • Submit your feedback or feature request
  • Categories
  • Questions
  • Predix | Updates
    • Pricing
    • Product
  • Deloitte - Private
  • How-To
  • Accenture-Private
  • Explore
  • Topics
  • Questions
  • Articles
  • Feedback or Feature Requests