title: How to remove table selectionMode completely based on a condition?
body: <p><code>p-table</code> allows us to add <code>selectionMode</code> property when we want to enable row selection. This can take '<strong>single</strong>' or '<strong>multiple</strong>' as possible values. What I want is to disable row selection completely if a variable <code>_selectionMode</code> is <strong>NONE</strong></p>
  <p>The only way I can think is by adding the <code>p-table</code> component conditionally like this:</p>
  <pre><code>&lt;p-table *ngIf=&quot;_selectedMode !== 'NONE'&quot;
      [value]=&quot;products&quot;
      selectionMode=&quot;single&quot;
      [(selection)]=&quot;selectedProduct1&quot;
      dataKey=&quot;code&quot;
    &gt;
  &lt;p-table *ngIf=&quot;_selectedMode === 'NONE'&quot;
      [value]=&quot;products&quot;
      [(selection)]=&quot;selectedProduct1&quot;
      dataKey=&quot;code&quot;
  </code></pre>
  <blockquote>
  </blockquote>
  <p>but if I do this, I have to duplicate all the attribute bindings on <code>p-table</code> (and there are quite a lot of them in my project). Is there a better way of disabling row selection conditionally?</p>
  <p>Simple stackblitz is <a href="https://stackblitz.com/edit/primeng-tableselection-demo-ygnjsx" rel="nofollow noreferrer">here</a></p>