-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(option group): propagate disabled state to child options #1416
Conversation
src/framework/theme/components/select/option-group.component.spec.ts
Outdated
Show resolved
Hide resolved
expect(setDisabledSpy).toHaveBeenCalledWith(true); | ||
}); | ||
|
||
it('should enable options if set enabled', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that way test name will be more readable 😄
it('should enable options if set enabled', () => { | |
it('should enable group options if group enabled', () => { |
@@ -119,6 +122,17 @@ export class NbOptionComponent<T> implements OnDestroy { | |||
this.setSelection(false); | |||
} | |||
|
|||
/** | |||
* Sets disabled by group state and marks component for check. | |||
* @param disabled group disabled state |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really need to specify that @param
?
`, | ||
}) | ||
export class NbOptionGroupTestComponent { | ||
selectDisabled: boolean = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's not specify the property type when we assign value during the declaration. I've described that slightly deeper in some comment below.
`, | ||
}) | ||
export class NbOptionDisabledTestComponent { | ||
optionGroupDisabled: boolean = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's not specify the property type when we assign value during the declaration. I've described that slightly deeper in some comment above.
Codecov Report
@@ Coverage Diff @@
## next #1416 +/- ##
=========================================
+ Coverage 82.5% 82.61% +0.11%
=========================================
Files 238 238
Lines 7270 7294 +24
Branches 647 651 +4
=========================================
+ Hits 5998 6026 +28
+ Misses 1083 1080 -3
+ Partials 189 188 -1
|
Please read and mark the following check list before creating a pull request:
Short description of what this resolves:
Disable options if group disabled