<?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: elad770</title>
    <description>The latest articles on DEV Community by elad770 (@elad770).</description>
    <link>https://dev.to/elad770</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%2F1140198%2F7012ab0b-325e-4f52-bf2c-774e25a5e15d.jpeg</url>
      <title>DEV Community: elad770</title>
      <link>https://dev.to/elad770</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/elad770"/>
    <language>en</language>
    <item>
      <title>Side effect in creating table text boxes using Angular</title>
      <dc:creator>elad770</dc:creator>
      <pubDate>Wed, 16 Aug 2023 14:36:57 +0000</pubDate>
      <link>https://dev.to/elad770/side-effect-in-creating-table-text-boxes-using-angular-2ikk</link>
      <guid>https://dev.to/elad770/side-effect-in-creating-table-text-boxes-using-angular-2ikk</guid>
      <description>&lt;p&gt;I am trying to create a table with 9 rows and 9 columns of text boxes, the point is that the table is built dynamically using Angular's mechanism,&lt;br&gt;
I have a class in the ts file of Angular that contains a two-dimensional array of strings and I fill this array with empty strings, in the html file I go over this array and based on it I build the text boxes. My problem occurs when, after the creation of the text boxes, I enter some value in a random text box, and what actually happens is the text is copied to an adjacent text box and the focus also moves to the adjacent text box.&lt;br&gt;
The thing is that I activate a click event in which I enter the value from the text box and put it in the cell according to the index of the row and column of the two-dimensional array of the string&lt;br&gt;
As soon as the value enters this array, the focus and the value itself is displayed in the adjacent text box, I tried all kinds of ways, also with the databinding mechanism with two way,&lt;br&gt;
Without the need to write one event or another, but the problem occurs anyway.&lt;br&gt;
The solution I made is to duplicate the two-dimensional array of the strings and on the duplicated array to save the values of the text boxes, the problem is that it is not a clean solution! I simply want to understand why this phenomenon occurs and how it can be overcome correctly&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--X9PpeUAv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e2b1pt4hwm7wrcj77nvb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--X9PpeUAv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e2b1pt4hwm7wrcj77nvb.png" alt="Image description" width="800" height="565"&gt;&lt;/a&gt;&lt;br&gt;
code in angular file ts:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--T7LvinHg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7wzldbj60oxnuhjn3ddf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--T7LvinHg--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7wzldbj60oxnuhjn3ddf.png" alt="Image description" width="800" height="560"&gt;&lt;/a&gt;&lt;br&gt;
The problematic section in the following event:&lt;br&gt;
handleInput&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--vNU5GA2W--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d64iizjpp0l70ywblhxf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--vNU5GA2W--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d64iizjpp0l70ywblhxf.png" alt="Image description" width="800" height="159"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--0sfMeF5V--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eh1xkyuv3tam2chj60vu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--0sfMeF5V--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eh1xkyuv3tam2chj60vu.png" alt="Image description" width="694" height="660"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>discuss</category>
    </item>
  </channel>
</rss>
