Skip to content

Commit b83805f

Browse files
committed
Fix wording and duplicate code in embeddable example plugin
Signed-off-by: abbyhu2000 <abigailhu2000@gmail.com>
1 parent 86d42bc commit b83805f

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

examples/embeddable_examples/public/searchable_list_container/searchable_list_container_component.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ export class SearchableListContainerComponentInner extends Component<Props, Stat
8282
const output = props.embeddable.getChild(id).getOutput();
8383
hasMatch[id] = hasHasMatchOutput(output) && output.hasMatch;
8484
});
85-
props.embeddable.getChildIds().forEach((id) => (checked[id] = false));
8685
this.state = {
8786
checked,
8887
hasMatch,

examples/embeddable_explorer/public/list_container_example.tsx

+10
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ import {
5151
import { SearchableContainerInput } from '../../embeddable_examples/public/searchable_list_container/searchable_list_container';
5252
import { TodoInput } from '../../embeddable_examples/public/todo';
5353
import { MultiTaskTodoInput } from '../../embeddable_examples/public/multi_task_todo';
54+
import { HelloWorldEmbeddable } from '../../embeddable_examples/public/hello_world/hello_world_embeddable';
5455

5556
interface Props {
5657
listContainerEmbeddableFactory: ListContainerFactory;
@@ -164,6 +165,15 @@ export function ListContainerExample({
164165
The first HelloWorldEmbeddable does not emit the hasMatch output variable, so the
165166
container chooses to hide it.
166167
</p>
168+
<p>
169+
Type some strings in the search bar, and press Check matching button. If the search
170+
string matches with any strings from the title or the description of the children
171+
embeddables, the child embeddable&#39;s check box will be checked. Noted that the
172+
search filter is case sensitive. However, even if the search string matches with the
173+
strings in the HelloWorldEmbeddable, its check box will not be checked because of the
174+
reason explained above. If we click Delete checked, all the selected child embeddables
175+
will be deleted from the container.
176+
</p>
167177

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

0 commit comments

Comments
 (0)