Skip to content

Commit

Permalink
Fix wording and duplicate code in embeddable example plugin
Browse files Browse the repository at this point in the history
Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com>
  • Loading branch information
abbyhu2000 committed Apr 21, 2023
1 parent 86d42bc commit 839c38e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ export class SearchableListContainerComponentInner extends Component<Props, Stat
const output = props.embeddable.getChild(id).getOutput();
hasMatch[id] = hasHasMatchOutput(output) && output.hasMatch;
});
props.embeddable.getChildIds().forEach((id) => (checked[id] = false));
this.state = {
checked,
hasMatch,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,15 @@ export function ListContainerExample({
The first HelloWorldEmbeddable does not emit the hasMatch output variable, so the
container chooses to hide it.
</p>
<p>
Type some strings in the search bar, and press Check matching button. If the search
string matches with any strings from the title or the description of the children
embeddables, the child embeddable&#39;s check box will be checked. Noted that the
search filter is case sensitive. However, even if the search string matches with the
strings in the HelloWorldEmbeddable, its check box will not be checked because of the
reason explained above. If we click Delete checked, all the selected child embeddables
will be deleted from the container.
</p>

<p>
Check out the &quot;Dynamically adding children&quot; section, to see how to add
Expand Down

0 comments on commit 839c38e

Please sign in to comment.