To highlight the radio button on expanding the panel in expansion panel












0















I have placed radio button inside each expansion-panel of accordion like this:



enter image description here



I want to highlight the ratio button on clicking particular expansion-panel and if i close the panel highlighting should go :



enter image description here



NOTE: I want to highlight the radio-button only on clicking the panel not on clicking the radio-button.



Stackblitz DEMO










share|improve this question





























    0















    I have placed radio button inside each expansion-panel of accordion like this:



    enter image description here



    I want to highlight the ratio button on clicking particular expansion-panel and if i close the panel highlighting should go :



    enter image description here



    NOTE: I want to highlight the radio-button only on clicking the panel not on clicking the radio-button.



    Stackblitz DEMO










    share|improve this question



























      0












      0








      0








      I have placed radio button inside each expansion-panel of accordion like this:



      enter image description here



      I want to highlight the ratio button on clicking particular expansion-panel and if i close the panel highlighting should go :



      enter image description here



      NOTE: I want to highlight the radio-button only on clicking the panel not on clicking the radio-button.



      Stackblitz DEMO










      share|improve this question
















      I have placed radio button inside each expansion-panel of accordion like this:



      enter image description here



      I want to highlight the ratio button on clicking particular expansion-panel and if i close the panel highlighting should go :



      enter image description here



      NOTE: I want to highlight the radio-button only on clicking the panel not on clicking the radio-button.



      Stackblitz DEMO







      angular angular-material angular6






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 22 '18 at 10:05







      Empty_Soul

















      asked Nov 22 '18 at 9:23









      Empty_SoulEmpty_Soul

      19711




      19711
























          2 Answers
          2






          active

          oldest

          votes


















          3














          Here is the pretty easier way to change the checkbox as panel status.



          <mat-accordion>
          <mat-expansion-panel #panel1>
          <mat-expansion-panel-header >
          <mat-panel-title>

          <mat-radio-button [checked]="panel1.expanded">Panel 1</mat-radio-button>
          </mat-panel-title>
          </mat-expansion-panel-header>
          Panel 1 comes here
          </mat-expansion-panel>
          <mat-expansion-panel #panel2>>
          <mat-expansion-panel-header>
          <mat-panel-title>
          <mat-radio-button [checked]="panel2.expanded"> Panel 2</mat-radio-button>
          </mat-panel-title>
          </mat-expansion-panel-header>
          Panel 2 comes here
          </mat-expansion-panel>
          <mat-expansion-panel #panel3>
          <mat-expansion-panel-header>
          <mat-panel-title>
          <mat-radio-button [checked]="panel3.expanded">Panel 3</mat-radio-button>
          </mat-panel-title>
          </mat-expansion-panel-header>
          Panel 3 comes here
          </mat-expansion-panel>
          </mat-accordion>


          Working copy is here - https://stackblitz.com/edit/angular-uhuunt-flryaz






          share|improve this answer
























          • Once again thanks for answer..:)

            – Empty_Soul
            Nov 22 '18 at 10:12



















          0














          Maybe you can try something like this ? I only added to the first one ...



              <mat-expansion-panel>
          <mat-expansion-panel-header >
          <mat-panel-title (click)="ww.checked=!ww.checked" >
          <mat-radio-button checked="false" #ww>Panel 1</mat-radio-button>
          </mat-panel-title>
          </mat-expansion-panel-header>
          Panel 1 comes here
          </mat-expansion-panel>


          https://stackblitz.com/edit/angular-uhuunt-2r2pf3






          share|improve this answer


























          • But it is checking only for one panel, i want for each panel.

            – Empty_Soul
            Nov 22 '18 at 9:48











          • If click particular panel, only that panels radio-button as to be highlighted not other panel's.

            – Empty_Soul
            Nov 22 '18 at 9:50











          • check it now, I updated the demo stackblitz.com/edit/angular-uhuunt-2r2pf3

            – freepowder
            Nov 22 '18 at 9:59











          • Please read my question once..:)

            – Empty_Soul
            Nov 22 '18 at 10:00






          • 1





            here you go! stackblitz.com/edit/angular-uhuunt-2r2pf3

            – freepowder
            Nov 22 '18 at 10:06











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53427563%2fto-highlight-the-radio-button-on-expanding-the-panel-in-expansion-panel%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          2 Answers
          2






          active

          oldest

          votes








          2 Answers
          2






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          3














          Here is the pretty easier way to change the checkbox as panel status.



          <mat-accordion>
          <mat-expansion-panel #panel1>
          <mat-expansion-panel-header >
          <mat-panel-title>

          <mat-radio-button [checked]="panel1.expanded">Panel 1</mat-radio-button>
          </mat-panel-title>
          </mat-expansion-panel-header>
          Panel 1 comes here
          </mat-expansion-panel>
          <mat-expansion-panel #panel2>>
          <mat-expansion-panel-header>
          <mat-panel-title>
          <mat-radio-button [checked]="panel2.expanded"> Panel 2</mat-radio-button>
          </mat-panel-title>
          </mat-expansion-panel-header>
          Panel 2 comes here
          </mat-expansion-panel>
          <mat-expansion-panel #panel3>
          <mat-expansion-panel-header>
          <mat-panel-title>
          <mat-radio-button [checked]="panel3.expanded">Panel 3</mat-radio-button>
          </mat-panel-title>
          </mat-expansion-panel-header>
          Panel 3 comes here
          </mat-expansion-panel>
          </mat-accordion>


          Working copy is here - https://stackblitz.com/edit/angular-uhuunt-flryaz






          share|improve this answer
























          • Once again thanks for answer..:)

            – Empty_Soul
            Nov 22 '18 at 10:12
















          3














          Here is the pretty easier way to change the checkbox as panel status.



          <mat-accordion>
          <mat-expansion-panel #panel1>
          <mat-expansion-panel-header >
          <mat-panel-title>

          <mat-radio-button [checked]="panel1.expanded">Panel 1</mat-radio-button>
          </mat-panel-title>
          </mat-expansion-panel-header>
          Panel 1 comes here
          </mat-expansion-panel>
          <mat-expansion-panel #panel2>>
          <mat-expansion-panel-header>
          <mat-panel-title>
          <mat-radio-button [checked]="panel2.expanded"> Panel 2</mat-radio-button>
          </mat-panel-title>
          </mat-expansion-panel-header>
          Panel 2 comes here
          </mat-expansion-panel>
          <mat-expansion-panel #panel3>
          <mat-expansion-panel-header>
          <mat-panel-title>
          <mat-radio-button [checked]="panel3.expanded">Panel 3</mat-radio-button>
          </mat-panel-title>
          </mat-expansion-panel-header>
          Panel 3 comes here
          </mat-expansion-panel>
          </mat-accordion>


          Working copy is here - https://stackblitz.com/edit/angular-uhuunt-flryaz






          share|improve this answer
























          • Once again thanks for answer..:)

            – Empty_Soul
            Nov 22 '18 at 10:12














          3












          3








          3







          Here is the pretty easier way to change the checkbox as panel status.



          <mat-accordion>
          <mat-expansion-panel #panel1>
          <mat-expansion-panel-header >
          <mat-panel-title>

          <mat-radio-button [checked]="panel1.expanded">Panel 1</mat-radio-button>
          </mat-panel-title>
          </mat-expansion-panel-header>
          Panel 1 comes here
          </mat-expansion-panel>
          <mat-expansion-panel #panel2>>
          <mat-expansion-panel-header>
          <mat-panel-title>
          <mat-radio-button [checked]="panel2.expanded"> Panel 2</mat-radio-button>
          </mat-panel-title>
          </mat-expansion-panel-header>
          Panel 2 comes here
          </mat-expansion-panel>
          <mat-expansion-panel #panel3>
          <mat-expansion-panel-header>
          <mat-panel-title>
          <mat-radio-button [checked]="panel3.expanded">Panel 3</mat-radio-button>
          </mat-panel-title>
          </mat-expansion-panel-header>
          Panel 3 comes here
          </mat-expansion-panel>
          </mat-accordion>


          Working copy is here - https://stackblitz.com/edit/angular-uhuunt-flryaz






          share|improve this answer













          Here is the pretty easier way to change the checkbox as panel status.



          <mat-accordion>
          <mat-expansion-panel #panel1>
          <mat-expansion-panel-header >
          <mat-panel-title>

          <mat-radio-button [checked]="panel1.expanded">Panel 1</mat-radio-button>
          </mat-panel-title>
          </mat-expansion-panel-header>
          Panel 1 comes here
          </mat-expansion-panel>
          <mat-expansion-panel #panel2>>
          <mat-expansion-panel-header>
          <mat-panel-title>
          <mat-radio-button [checked]="panel2.expanded"> Panel 2</mat-radio-button>
          </mat-panel-title>
          </mat-expansion-panel-header>
          Panel 2 comes here
          </mat-expansion-panel>
          <mat-expansion-panel #panel3>
          <mat-expansion-panel-header>
          <mat-panel-title>
          <mat-radio-button [checked]="panel3.expanded">Panel 3</mat-radio-button>
          </mat-panel-title>
          </mat-expansion-panel-header>
          Panel 3 comes here
          </mat-expansion-panel>
          </mat-accordion>


          Working copy is here - https://stackblitz.com/edit/angular-uhuunt-flryaz







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 22 '18 at 10:10









          Sunil SinghSunil Singh

          6,1672626




          6,1672626













          • Once again thanks for answer..:)

            – Empty_Soul
            Nov 22 '18 at 10:12



















          • Once again thanks for answer..:)

            – Empty_Soul
            Nov 22 '18 at 10:12

















          Once again thanks for answer..:)

          – Empty_Soul
          Nov 22 '18 at 10:12





          Once again thanks for answer..:)

          – Empty_Soul
          Nov 22 '18 at 10:12













          0














          Maybe you can try something like this ? I only added to the first one ...



              <mat-expansion-panel>
          <mat-expansion-panel-header >
          <mat-panel-title (click)="ww.checked=!ww.checked" >
          <mat-radio-button checked="false" #ww>Panel 1</mat-radio-button>
          </mat-panel-title>
          </mat-expansion-panel-header>
          Panel 1 comes here
          </mat-expansion-panel>


          https://stackblitz.com/edit/angular-uhuunt-2r2pf3






          share|improve this answer


























          • But it is checking only for one panel, i want for each panel.

            – Empty_Soul
            Nov 22 '18 at 9:48











          • If click particular panel, only that panels radio-button as to be highlighted not other panel's.

            – Empty_Soul
            Nov 22 '18 at 9:50











          • check it now, I updated the demo stackblitz.com/edit/angular-uhuunt-2r2pf3

            – freepowder
            Nov 22 '18 at 9:59











          • Please read my question once..:)

            – Empty_Soul
            Nov 22 '18 at 10:00






          • 1





            here you go! stackblitz.com/edit/angular-uhuunt-2r2pf3

            – freepowder
            Nov 22 '18 at 10:06
















          0














          Maybe you can try something like this ? I only added to the first one ...



              <mat-expansion-panel>
          <mat-expansion-panel-header >
          <mat-panel-title (click)="ww.checked=!ww.checked" >
          <mat-radio-button checked="false" #ww>Panel 1</mat-radio-button>
          </mat-panel-title>
          </mat-expansion-panel-header>
          Panel 1 comes here
          </mat-expansion-panel>


          https://stackblitz.com/edit/angular-uhuunt-2r2pf3






          share|improve this answer


























          • But it is checking only for one panel, i want for each panel.

            – Empty_Soul
            Nov 22 '18 at 9:48











          • If click particular panel, only that panels radio-button as to be highlighted not other panel's.

            – Empty_Soul
            Nov 22 '18 at 9:50











          • check it now, I updated the demo stackblitz.com/edit/angular-uhuunt-2r2pf3

            – freepowder
            Nov 22 '18 at 9:59











          • Please read my question once..:)

            – Empty_Soul
            Nov 22 '18 at 10:00






          • 1





            here you go! stackblitz.com/edit/angular-uhuunt-2r2pf3

            – freepowder
            Nov 22 '18 at 10:06














          0












          0








          0







          Maybe you can try something like this ? I only added to the first one ...



              <mat-expansion-panel>
          <mat-expansion-panel-header >
          <mat-panel-title (click)="ww.checked=!ww.checked" >
          <mat-radio-button checked="false" #ww>Panel 1</mat-radio-button>
          </mat-panel-title>
          </mat-expansion-panel-header>
          Panel 1 comes here
          </mat-expansion-panel>


          https://stackblitz.com/edit/angular-uhuunt-2r2pf3






          share|improve this answer















          Maybe you can try something like this ? I only added to the first one ...



              <mat-expansion-panel>
          <mat-expansion-panel-header >
          <mat-panel-title (click)="ww.checked=!ww.checked" >
          <mat-radio-button checked="false" #ww>Panel 1</mat-radio-button>
          </mat-panel-title>
          </mat-expansion-panel-header>
          Panel 1 comes here
          </mat-expansion-panel>


          https://stackblitz.com/edit/angular-uhuunt-2r2pf3







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Nov 22 '18 at 9:50

























          answered Nov 22 '18 at 9:46









          freepowderfreepowder

          2796




          2796













          • But it is checking only for one panel, i want for each panel.

            – Empty_Soul
            Nov 22 '18 at 9:48











          • If click particular panel, only that panels radio-button as to be highlighted not other panel's.

            – Empty_Soul
            Nov 22 '18 at 9:50











          • check it now, I updated the demo stackblitz.com/edit/angular-uhuunt-2r2pf3

            – freepowder
            Nov 22 '18 at 9:59











          • Please read my question once..:)

            – Empty_Soul
            Nov 22 '18 at 10:00






          • 1





            here you go! stackblitz.com/edit/angular-uhuunt-2r2pf3

            – freepowder
            Nov 22 '18 at 10:06



















          • But it is checking only for one panel, i want for each panel.

            – Empty_Soul
            Nov 22 '18 at 9:48











          • If click particular panel, only that panels radio-button as to be highlighted not other panel's.

            – Empty_Soul
            Nov 22 '18 at 9:50











          • check it now, I updated the demo stackblitz.com/edit/angular-uhuunt-2r2pf3

            – freepowder
            Nov 22 '18 at 9:59











          • Please read my question once..:)

            – Empty_Soul
            Nov 22 '18 at 10:00






          • 1





            here you go! stackblitz.com/edit/angular-uhuunt-2r2pf3

            – freepowder
            Nov 22 '18 at 10:06

















          But it is checking only for one panel, i want for each panel.

          – Empty_Soul
          Nov 22 '18 at 9:48





          But it is checking only for one panel, i want for each panel.

          – Empty_Soul
          Nov 22 '18 at 9:48













          If click particular panel, only that panels radio-button as to be highlighted not other panel's.

          – Empty_Soul
          Nov 22 '18 at 9:50





          If click particular panel, only that panels radio-button as to be highlighted not other panel's.

          – Empty_Soul
          Nov 22 '18 at 9:50













          check it now, I updated the demo stackblitz.com/edit/angular-uhuunt-2r2pf3

          – freepowder
          Nov 22 '18 at 9:59





          check it now, I updated the demo stackblitz.com/edit/angular-uhuunt-2r2pf3

          – freepowder
          Nov 22 '18 at 9:59













          Please read my question once..:)

          – Empty_Soul
          Nov 22 '18 at 10:00





          Please read my question once..:)

          – Empty_Soul
          Nov 22 '18 at 10:00




          1




          1





          here you go! stackblitz.com/edit/angular-uhuunt-2r2pf3

          – freepowder
          Nov 22 '18 at 10:06





          here you go! stackblitz.com/edit/angular-uhuunt-2r2pf3

          – freepowder
          Nov 22 '18 at 10:06


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53427563%2fto-highlight-the-radio-button-on-expanding-the-panel-in-expansion-panel%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          404 Error Contact Form 7 ajax form submitting

          How to know if a Active Directory user can login interactively

          TypeError: fit_transform() missing 1 required positional argument: 'X'