Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
angular
web-table
Commits
cb5cf78e
Commit
cb5cf78e
authored
Apr 25, 2019
by
Zéfling
🎨
Browse files
Reduce lag
parent
ce9358cb
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/app/element-line.component.ts
View file @
cb5cf78e
...
...
@@ -15,23 +15,20 @@ export class ElementLineComponent implements OnChanges {
browsers
=
[];
constructor
(
private
appService
:
AppService
)
{
}
constructor
(
private
appService
:
AppService
)
{
}
ngOnChanges
(
changes
:
SimpleChanges
)
{
if
(
changes
[
'
element
'
].
currentValue
!==
changes
[
'
element
'
].
previousValue
)
{
setTimeout
(()
=>
{
const
browser
=
this
.
appService
.
browsers
;
this
.
browsers
=
[];
for
(
const
i
in
browser
)
{
if
(
browser
[
i
])
{
this
.
browsers
.
push
({
id
:
i
,
...
this
.
element
.
support
[
i
]
});
}
const
browser
=
this
.
appService
.
browsers
;
this
.
browsers
=
[];
for
(
const
i
in
browser
)
{
if
(
browser
[
i
])
{
this
.
browsers
.
push
({
id
:
i
,
...
this
.
element
.
support
[
i
]
});
}
}
);
}
}
}
...
...
@@ -39,6 +36,4 @@ export class ElementLineComponent implements OnChanges {
return
typeof
data
===
'
object
'
&&
data
.
length
;
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment