ngx-text-diff icon indicating copy to clipboard operation
ngx-text-diff copied to clipboard

`hideMatchingLines` attribute doesn't work

Open djorg83 opened this issue 5 years ago • 2 comments

When passing hideMatchingLines=true, the unmatched lines still show.

Example

<td-ngx-text-diff [left]="leftText" [right]="rightText" [hideMatchingLines]="true"></td-ngx-text-diff>

Cause

The @Input() should be on the setter, not the getter.

@Input()
get hideMatchingLines() {
  return this._hideMatchingLines;
}

set hideMatchingLines(hide: boolean) {
  this.hideMatchingLinesChanged(hide);
}

Solution

Move the @Input() to the setter.

get hideMatchingLines() {
  return this._hideMatchingLines;
}

@Input()
set hideMatchingLines(hide: boolean) {
  this.hideMatchingLinesChanged(hide);
}

djorg83 avatar Nov 05 '19 16:11 djorg83

any update on this? This property doesn't seem to work still...

seiwonlee avatar Jul 01 '20 21:07 seiwonlee

I'm using ng9. diff text works fine, but "loading indicator" and "hideMatchingLines" doesn't work

riccardotreagles avatar Nov 28 '20 17:11 riccardotreagles