<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: jan</title>
    <description>The latest articles on DEV Community by jan (@pranathitammina1).</description>
    <link>https://dev.to/pranathitammina1</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F832053%2F631db909-346b-4702-b78c-a40a7c558b66.png</url>
      <title>DEV Community: jan</title>
      <link>https://dev.to/pranathitammina1</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/pranathitammina1"/>
    <language>en</language>
    <item>
      <title>How to hide content conditionally in js?</title>
      <dc:creator>jan</dc:creator>
      <pubDate>Fri, 03 Jun 2022 05:50:13 +0000</pubDate>
      <link>https://dev.to/pranathitammina1/how-to-hide-content-conditionally-in-js-2eg3</link>
      <guid>https://dev.to/pranathitammina1/how-to-hide-content-conditionally-in-js-2eg3</guid>
      <description>&lt;p&gt;I have two dropdowns.&lt;br&gt;
First with A, B, C and second with D, E, F, G. Next only after selecting the options from first and second dropdowns I am able to select the content which is a list of checkboxes. &lt;br&gt;
Now I want to hide my content until user selects the option from first and second dropdown. Till now I have made it unselectable until user selects options from both the dropdowns, but now I want to hide it. As soon as the user selects options from first and second dropdowns the content should appear.&lt;/p&gt;

&lt;h1&gt;
  
  
  reactjs #discuss
&lt;/h1&gt;

</description>
    </item>
    <item>
      <title>How to get an alert message when changing the options in react?</title>
      <dc:creator>jan</dc:creator>
      <pubDate>Tue, 26 Apr 2022 06:35:16 +0000</pubDate>
      <link>https://dev.to/pranathitammina1/how-to-get-an-alert-message-when-changing-the-options-in-react-10gk</link>
      <guid>https://dev.to/pranathitammina1/how-to-get-an-alert-message-when-changing-the-options-in-react-10gk</guid>
      <description>&lt;p&gt;I am having an ADD button which allows me to add some objects to the option that I selected in the dropdown. And I also have a function attached to that Add Button.&lt;/p&gt;

&lt;p&gt;` onAddClicked = () =&amp;gt;{&lt;br&gt;
        this.setState({&lt;br&gt;
            showOptions: true&lt;br&gt;
        }); &lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;}`
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;button type="button" onClick={this.onAddClick}&lt;br&gt;
   style={{ float: "right",  marginLeft: "10px", marginRight: "10px" }}&lt;br&gt;
    id="AddSelectedTag"&lt;br&gt;
    className={((this.state.selectedOptions ?this.state.selectedOptions.length === 0 : true) ? &lt;br&gt;
    "re-btn-primary-inactive" : "re-btn-primary-blue")}disabled={(this.state.selectedOptions ? &lt;br&gt;
    this.state.selectedOptions.length === 0 : true) ? true : false}&amp;gt;Add &lt;br&gt;
    &amp;lt;/button&amp;gt;&lt;/code&gt;&lt;br&gt;
I can select and option and few objects under it. Now I need to display an error message when I want to change my option after selecting few objects under that. I am having state for my selected options as "this.state.selectedOptions". I am trying this in my onAddClick().&lt;/p&gt;

&lt;p&gt;&lt;code&gt;if(this.state.selectedOptions ? this.state.selectedOptions.value : null)&lt;br&gt;
        {&lt;br&gt;
          alert("selectedOptions value has changed");&lt;br&gt;
        }&lt;/code&gt;&lt;br&gt;
But this is returning an alert message everytime I click on the Add button, not when I try to change the state&lt;/p&gt;

</description>
    </item>
    <item>
      <title>How to disable checkboxes using their class name?</title>
      <dc:creator>jan</dc:creator>
      <pubDate>Wed, 20 Apr 2022 07:14:13 +0000</pubDate>
      <link>https://dev.to/pranathitammina1/how-to-disable-checkboxes-using-their-class-name-25cg</link>
      <guid>https://dev.to/pranathitammina1/how-to-disable-checkboxes-using-their-class-name-25cg</guid>
      <description>&lt;p&gt;I am having a set of '6' checkboxes and all these are in img format, a class name is assigned to them i.e, "re-lbl-normal-12". Now I want to disable '3' checkboxes with Id's "1,2,6". I want to disable them using their class name. How can I do this?&lt;/p&gt;

&lt;h1&gt;
  
  
  javascript #reactjs
&lt;/h1&gt;

</description>
    </item>
    <item>
      <title>Want to Disable the checkboxes / grey them out.</title>
      <dc:creator>jan</dc:creator>
      <pubDate>Wed, 20 Apr 2022 05:41:15 +0000</pubDate>
      <link>https://dev.to/pranathitammina1/want-to-disable-the-checkboxes-grey-them-out-2neh</link>
      <guid>https://dev.to/pranathitammina1/want-to-disable-the-checkboxes-grey-them-out-2neh</guid>
      <description>&lt;p&gt;I have a list which consists of checkboxes. My requirement is based on another array called options. My option array has 3 elements and for the first option all the checkboxes should be available, so I can check them based on my requirement. But for the remaining 2 options I have to disable a few checkboxes based on their Id's.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;if(event.value == 5){&lt;br&gt;
            var opt = this.state.checkoxesArray&lt;br&gt;
            {&lt;br&gt;
                opt = opt.map((obj) =&amp;gt;&lt;br&gt;
                {&lt;br&gt;
                  if(obj.id === 1 || obj.id === 4 || obj.id === 6)&lt;br&gt;
                    {&lt;br&gt;
                        obj.disable = true;&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                }
                return obj;
            }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is how I disabled for my remaining 2 options. Here as of now I am unable to check a few checkboxes for value '5'. But I want to grey it out or remove them, for 2 options and enable all these for 1 option.&lt;/p&gt;

&lt;p&gt;I am new to react. Thanks in advance.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
