This repository has been archived by the owner on Jun 29, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: lists react to value prop changes in items (#750)
* lists react to value prop changes in items * add test for value change functionality * remove .only * rename event
- Loading branch information
Showing
6 changed files
with
130 additions
and
0 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=5.0" /> | ||
<title>Demos - ValueList</title> | ||
<script src="../_assets/head.js"></script> | ||
<script src="../_assets/toggles.js"></script> | ||
</head> | ||
<body> | ||
<main> | ||
<section class="example-container"> | ||
<h1>calcite-value-list</h1> | ||
<p> | ||
see the | ||
<a | ||
href="https://github.com/Esri/calcite-app-components/tree/master/src/components/calcite-value-list/readme.md" | ||
>calcite-value-list readme.</a | ||
> | ||
</p> | ||
|
||
<h3>multiple</h3> | ||
<calcite-value-list id="one"> | ||
<calcite-action slot="menu-actions" indicator text="Cool"> | ||
<calcite-icon icon="hamburger" scale="s"></calcite-icon> | ||
</calcite-action> | ||
<calcite-value-list-item text-label="Dogs" text-description="Man's best friend" value="dogs"> | ||
<calcite-action slot="secondary-action" text="click-me" onClick="console.log('clicked');"> | ||
<calcite-icon icon="x" scale="s"></calcite-icon> | ||
</calcite-action> | ||
</calcite-value-list-item> | ||
<calcite-value-list-item text-label="Cats" text-description="Independent and fluffy" value="cats"> | ||
<calcite-action slot="secondary-action" text="click-me" onClick="console.log('clicked');"> | ||
<calcite-icon icon="x" scale="s"></calcite-icon> | ||
</calcite-action> | ||
</calcite-value-list-item> | ||
<calcite-value-list-item | ||
text-label="Fish. But not just any fish, a tiger fish caught live in the Atlantic Ocean while on vacation." | ||
text-description="Easy to care for." | ||
value="fish" | ||
> | ||
<calcite-action slot="secondary-action" text="click-me" onClick="console.log('clicked');"> | ||
<calcite-icon icon="x" scale="s"></calcite-icon> | ||
</calcite-action> | ||
</calcite-value-list-item> | ||
</calcite-value-list> | ||
<button id="click">Click</button> | ||
<script> | ||
document.querySelector("#click").addEventListener("click", (event) => { | ||
const valueList = document.querySelector("#one"); | ||
valueList.querySelector("calcite-value-list-item").value = "not dogs"; | ||
}); | ||
</script> | ||
</section> | ||
</main> | ||
</body> | ||
</html> |