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
feat: lists react to value prop changes in items #750
Merged
Merged
Changes from 5 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
92617e8
lists react to value prop changes in items
5ec79e0
add test for value change functionality
pr3tori4n 7445047
remove .only
pr3tori4n f282b09
rename event
pr3tori4n 0f6f255
Merge branch 'master' into hrobbins/value-list-change-value-738
pr3tori4n e863be7
Merge branch 'master' into hrobbins/value-list-change-value-738
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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> |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
For consistency, the demo filename should be kebab-cased.