Skip to content

Commit

Permalink
fix(legacy): prevent add/remove suffixes while InputNumber is readonly (
Browse files Browse the repository at this point in the history
#8568)

Co-authored-by: a.s.radionov <[email protected]>
  • Loading branch information
Andronzi and a.s.radionov authored Aug 19, 2024
1 parent 6f932b3 commit 7a58d78
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,10 @@ export class TuiInputNumberComponent
this.unfinishedValue = null;

if (Number.isNaN(nativeNumberValue)) {
this.nativeValue = focused ? this.computedPrefix + this.computedPostfix : '';
this.nativeValue =
focused && !this.readOnly
? this.computedPrefix + this.computedPostfix
: '';
this.value = null;

return;
Expand Down

0 comments on commit 7a58d78

Please sign in to comment.