Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
verona-modules-aspect
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IQB
verona-modules-aspect
Commits
6d4e5b7a
Commit
6d4e5b7a
authored
1 year ago
by
jojohoch
Browse files
Options
Downloads
Patches
Plain Diff
Use new mdc based material classes in InputBackgroundColorDirective
parent
4dab4095
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
projects/common/directives/input-background-color.directive.ts
+3
-5
3 additions, 5 deletions
...cts/common/directives/input-background-color.directive.ts
with
3 additions
and
5 deletions
projects/common/directives/input-background-color.directive.ts
+
3
−
5
View file @
6d4e5b7a
...
@@ -2,9 +2,7 @@ import {
...
@@ -2,9 +2,7 @@ import {
Directive
,
ElementRef
,
Input
,
OnChanges
,
SimpleChanges
Directive
,
ElementRef
,
Input
,
OnChanges
,
SimpleChanges
}
from
'
@angular/core
'
;
}
from
'
@angular/core
'
;
@
Directive
({
@
Directive
({
selector
:
'
[aspectInputBackgroundColor]
'
})
selector
:
'
[aspectInputBackgroundColor]
'
})
export
class
InputBackgroundColorDirective
implements
OnChanges
{
export
class
InputBackgroundColorDirective
implements
OnChanges
{
@
Input
()
backgroundColor
!
:
string
;
@
Input
()
backgroundColor
!
:
string
;
@
Input
()
appearance
!
:
string
;
@
Input
()
appearance
!
:
string
;
...
@@ -23,9 +21,9 @@ export class InputBackgroundColorDirective implements OnChanges {
...
@@ -23,9 +21,9 @@ export class InputBackgroundColorDirective implements OnChanges {
private
setBackgroundColor
():
void
{
private
setBackgroundColor
():
void
{
let
targetElements
:
HTMLElement
[];
let
targetElements
:
HTMLElement
[];
if
(
this
.
appearance
===
'
outline
'
)
{
if
(
this
.
appearance
===
'
outline
'
)
{
targetElements
=
this
.
elementRef
.
nativeElement
.
querySelector
(
'
div.m
at-form-fiel
d-outline
'
)?.
children
;
targetElements
=
this
.
elementRef
.
nativeElement
.
querySelector
(
'
div.m
dc-notche
d-outline
'
)?.
children
;
}
else
{
}
else
{
targetElements
=
[
this
.
elementRef
.
nativeElement
.
querySelector
(
'
div.mat-form-field-flex
'
)];
targetElements
=
[
this
.
elementRef
.
nativeElement
.
querySelector
(
'
div.mat-
mdc-
form-field-flex
'
)];
}
}
// This fails, when component is not set up yet, therefore the extra check
// This fails, when component is not set up yet, therefore the extra check
if
(
targetElements
)
{
if
(
targetElements
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment