-
Notifications
You must be signed in to change notification settings - Fork 382
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(engine-core): fix warnings for invalid keys (#4097)
- Loading branch information
1 parent
2870fc3
commit 3665f31
Showing
8 changed files
with
86 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
packages/@lwc/integration-karma/test/template/directive-for-each/x/custom/custom.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { LightningElement } from 'lwc'; | ||
|
||
export default class Custom extends LightningElement {} |
5 changes: 4 additions & 1 deletion
5
packages/@lwc/integration-karma/test/template/directive-for-each/x/test/test.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
<template> | ||
<ul> | ||
<template for:each={items} for:item="item"> | ||
<li key={item.key}>{item.value}</li> | ||
<li key={item.key}> | ||
<!-- putting an lwc:if in here so that the LI will always be VElement instead of VStatic --> | ||
<template lwc:if={item.value}>{item.value}</template> | ||
</li> | ||
</template> | ||
</ul> | ||
</template> |
7 changes: 7 additions & 0 deletions
7
...gration-karma/test/template/directive-for-each/x/testCustomElement/testCustomElement.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<template> | ||
<ul> | ||
<template for:each={items} for:item="item"> | ||
<x-custom key={item.key}></x-custom> | ||
</template> | ||
</ul> | ||
</template> |
5 changes: 5 additions & 0 deletions
5
...tegration-karma/test/template/directive-for-each/x/testCustomElement/testCustomElement.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { LightningElement, api } from 'lwc'; | ||
|
||
export default class TestCustomElement extends LightningElement { | ||
@api items = []; | ||
} |
7 changes: 7 additions & 0 deletions
7
...ages/@lwc/integration-karma/test/template/directive-for-each/x/testStatic/testStatic.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<template> | ||
<ul> | ||
<template for:each={items} for:item="item"> | ||
<li key={item.key}></li> | ||
</template> | ||
</ul> | ||
</template> |
5 changes: 5 additions & 0 deletions
5
packages/@lwc/integration-karma/test/template/directive-for-each/x/testStatic/testStatic.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { LightningElement, api } from 'lwc'; | ||
|
||
export default class TestStatic extends LightningElement { | ||
@api items = []; | ||
} |