Skip to content

Commit 554705f

Browse files
committed
fix(migrations): move disabled property to textarea, #9339
1 parent fe76f08 commit 554705f

File tree

2 files changed

+27
-1
lines changed

2 files changed

+27
-1
lines changed

projects/igniteui-angular/migrations/update-12_0_0/index.spec.ts

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1852,4 +1852,30 @@ export class SimpleComponent {
18521852
`
18531853
);
18541854
});
1855+
1856+
it('Should move disabled input group to textarea w/ igxInput', async () => {
1857+
appTree.create(
1858+
`/testSrc/appPrefix/component/test.component.html`,
1859+
`
1860+
<igx-input-group [disabled]="true">
1861+
<textarea igxInput [(ngModel)]="name">Some Text</textarea>
1862+
</igx-input-group>
1863+
`
1864+
);
1865+
1866+
const tree = await schematicRunner
1867+
.runSchematicAsync(migrationName, {}, appTree)
1868+
.toPromise();
1869+
// this is the expected output
1870+
// putting just the disabled attribute on an igx-input-group is an invalid scenario
1871+
expect(
1872+
tree.readContent('/testSrc/appPrefix/component/test.component.html')
1873+
).toEqual(
1874+
`
1875+
<igx-input-group>
1876+
<textarea igxInput [(ngModel)]="name" [disabled]="true">Some Text</textarea>
1877+
</igx-input-group>
1878+
`
1879+
);
1880+
});
18551881
});

projects/igniteui-angular/migrations/update-12_0_0/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ See https://www.infragistics.com/products/ignite-ui-angular/angular/components/t
472472
const INPUT_GROUP_CHANGES = {
473473
GROUP_TAG: 'igx-input-group',
474474
ATTRIBUTES: ['[disabled]', 'disabled'],
475-
INPUT_TAG: 'input',
475+
INPUT_TAG: ['input', 'textarea'],
476476
DIRECTIVE: 'igxInput'
477477
};
478478

0 commit comments

Comments
 (0)