Skip to content

Commit 4426161

Browse files
committed
fix disabled select example
1 parent 8d6993e commit 4426161

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

apps/design-land/src/app/app-routing.module.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ export const appRoutes: Routes = [
1818
{ path: 'checkbox', loadChildren: () => import('./checkbox/checkbox.module').then(m => m.DesignLandCheckboxModule) },
1919
{ path: 'color', loadChildren: () => import('./foundations/color/color.module').then(m => m.DesignLandColorModule) },
2020
{ path: 'container', loadChildren: () => import('./container/container.module').then(m => m.DesignLandContainerModule) },
21-
{ path: 'select', loadChildren: () => import('./select/select.module').then(m => m.DesignLandSelectModule) },
2221
{ path: 'feature', loadChildren: () => import('./feature/feature.module').then(m => m.DesignLandFeatureModule) },
2322
{ path: 'form', loadChildren: () => import('./form/form.module').then(m => m.DesignLandFormModule) },
2423
{ path: 'hero', loadChildren: () => import('./hero/hero.module').then(m => m.DesignLandHeroModule) },
@@ -37,6 +36,7 @@ export const appRoutes: Routes = [
3736
{ path: 'progress-indicator', loadChildren: () => import('./progress-indicator/progress-indicator.module').then(m => m.DesignLandProgressIndicatorModule) },
3837
{ path: 'qty-dropdown', loadChildren: () => import('./qty-dropdown/qty-dropdown.module').then(m => m.DesignLandQtyDropdownModule) },
3938
{ path: 'quantity-field', loadChildren: () => import('./quantity-field/quantity-field.module').then(m => m.DesignLandQuantityFieldModule) },
39+
{ path: 'select', loadChildren: () => import('./select/select.module').then(m => m.DesignLandSelectModule) },
4040
{ path: 'sidebar', loadChildren: () => import('./sidebar/sidebar.module').then(m => m.DesignLandSidebarModule) },
4141
{ path: 'radio', loadChildren: () => import('./radio/radio.module').then(m => m.DesignLandRadioModule) },
4242
{ path: 'typography', loadChildren: () => import('./typography/typography.module').then(m => m.DesignLandTypographyModule) },
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<daff-select [options]="options" [formControl]="control" [disabled]="true">
1+
<daff-select [options]="options" [formControl]="disabled" [disabled]="true">
22
<label daffFormLabel>Select an address</label>
33
<ng-template daffSelectOption let-option="option"></ng-template>
44
</daff-select>

libs/design/select/examples/src/disabled-select/disabled-select.component.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import {
22
ChangeDetectionStrategy,
33
Component,
44
} from '@angular/core';
5-
import { FormControl } from '@angular/forms';
5+
import { UntypedFormControl } from '@angular/forms';
66

77
import { SELECT_EXAMPLE_ADDRESSES } from '../models/addresses';
88

@@ -13,7 +13,7 @@ import { SELECT_EXAMPLE_ADDRESSES } from '../models/addresses';
1313
changeDetection: ChangeDetectionStrategy.OnPush,
1414
})
1515
export class DisabledSelectComponent {
16-
control = new FormControl();
16+
disabled = new UntypedFormControl({ value : '' , disabled: true });
1717

1818
options = SELECT_EXAMPLE_ADDRESSES;
1919
}

0 commit comments

Comments
 (0)