Skip to content

Commit

Permalink
chore(demo): add when-defined for demo snippets
Browse files Browse the repository at this point in the history
  • Loading branch information
web-padawan committed Jan 9, 2019
1 parent 0e9d613 commit 24d7a35
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
10 changes: 5 additions & 5 deletions demo/combo-box-basic-demos.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<h3>Combo Box</h3>

<vaadin-demo-snippet id="combo-box-basic-combo-box">
<vaadin-demo-snippet id="combo-box-basic-combo-box" when-defined="vaadin-combo-box">
<template preserve-content>
<vaadin-combo-box label="Element"></vaadin-combo-box>
<script>
Expand All @@ -22,7 +22,7 @@ <h3>Combo Box</h3>

<h3>Configuring the Combo Box</h3>

<vaadin-demo-snippet id="combo-box-basic-demos-configuring-the-combo-box">
<vaadin-demo-snippet id="combo-box-basic-demos-configuring-the-combo-box" when-defined="vaadin-combo-box">
<template preserve-content>
<vaadin-combo-box label="Element"></vaadin-combo-box>
<vaadin-combo-box label="Disabled" disabled></vaadin-combo-box>
Expand All @@ -43,7 +43,7 @@ <h3>Configuring the Combo Box</h3>

<h3>Allow Custom Values</h3>
<p>Allow the user to set any value for the field in addition to selecting a value from the dropdown menu.</p>
<vaadin-demo-snippet id="combo-box-basic-demos-allow-custom-values">
<vaadin-demo-snippet id="combo-box-basic-demos-allow-custom-values" when-defined="vaadin-combo-box">
<template preserve-content>
<vaadin-combo-box label="Element" allow-custom-value></vaadin-combo-box>
<p>Selected value: <span></span></p>
Expand Down Expand Up @@ -75,13 +75,13 @@ <h3>Allow Custom Values</h3>

<h3>Lazy Loading</h3>
<p>
The <code>dataProvider</code> property can be assigend a function to provide
The <code>dataProvider</code> property can be assigned a function to provide
data from a remote source.
</p>
<p>
<b>Note:</b> the total number of items must be provided as the second argument of the data provider <code>callback</code>.
</p>
<vaadin-demo-snippet id="combo-box-basic-demos-lazy-loading">
<vaadin-demo-snippet id="combo-box-basic-demos-lazy-loading" when-defined="vaadin-combo-box">
<template preserve-content>
<vaadin-combo-box label="Country"></vaadin-combo-box>
<script>
Expand Down
4 changes: 2 additions & 2 deletions demo/combo-box-filtering-demos.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@


<h3>Filtering with a Remote Data Source</h3>
<vaadin-demo-snippet id="combo-box-filtering-demos-remote-data-source">
<vaadin-demo-snippet id="combo-box-filtering-demos-remote-data-source" when-defined="vaadin-combo-box">
<template preserve-content>

<iron-ajax auto></iron-ajax>
Expand Down Expand Up @@ -36,7 +36,7 @@ <h3>Filtering with a Remote Data Source</h3>

<h3>Custom Filtering</h3>
<p>Example uses case-sensitive starts-with filtering</p>
<vaadin-demo-snippet id="combo-box-filtering-demos-custom-filtering">
<vaadin-demo-snippet id="combo-box-filtering-demos-custom-filtering" when-defined="vaadin-combo-box">
<template preserve-content>
<vaadin-combo-box></vaadin-combo-box>
<script>
Expand Down
14 changes: 7 additions & 7 deletions demo/combo-box-styling-demos.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</style>

<h3>Customizing Item</h3>
<vaadin-demo-snippet id="combo-box-styling-demos-renderer">
<vaadin-demo-snippet id="combo-box-styling-demos-renderer" when-defined="vaadin-combo-box">
<template preserve-content>
<vaadin-combo-box label="Element" item-label-path="name" item-value-path="symbol" style="width: 240px;">
</vaadin-combo-box>
Expand Down Expand Up @@ -35,7 +35,7 @@ <h3>Customizing Item with Template</h3>
<p>
The content can be provided declaratively using templates
</p>
<vaadin-demo-snippet id="combo-box-styling-demos-custom-item-template">
<vaadin-demo-snippet id="combo-box-styling-demos-custom-item-template" when-defined="vaadin-combo-box">
<template preserve-content>
<vaadin-combo-box label="Element" item-label-path="name" item-value-path="symbol" style="width: 240px;">
<template>
Expand All @@ -53,7 +53,7 @@ <h3>Customizing Item with Template</h3>


<h3>Configuring Icons</h3>
<vaadin-demo-snippet id="combo-box-styling-demos-configuring-icons">
<vaadin-demo-snippet id="combo-box-styling-demos-configuring-icons" when-defined="vaadin-combo-box-light">
<template preserve-content>
<style>
paper-icon-button {
Expand Down Expand Up @@ -84,7 +84,7 @@ <h3>Replacing the Input</h3>
If you are using other custom input fields like &lt;iron-input>, you
need to define the name of the bindable property with the `attrForValue` attribute.
</p>
<vaadin-demo-snippet id="combo-box-styling-demos-replacing-the-input-with-an-iron-input">
<vaadin-demo-snippet id="combo-box-styling-demos-replacing-the-input-with-an-iron-input" when-defined="vaadin-combo-box-light">
<template preserve-content>
<vaadin-combo-box-light attr-for-value="bind-value">
<iron-input>
Expand All @@ -101,7 +101,7 @@ <h3>Replacing the Input</h3>


<h3>Using Focused and Selected Flags</h3>
<vaadin-demo-snippet id="combo-box-styling-demos-focused-and-selected-flags">
<vaadin-demo-snippet id="combo-box-styling-demos-focused-and-selected-flags" when-defined="vaadin-combo-box">
<template preserve-content>
<vaadin-combo-box label="Element" value="Carbon">
<template>
Expand All @@ -127,7 +127,7 @@ <h3>Using Focused and Selected Flags</h3>
</vaadin-demo-snippet>

<h3>Small Text Field (Lumo Theme Variant)</h3>
<vaadin-demo-snippet id="combo-box-styling-demos-small">
<vaadin-demo-snippet id="combo-box-styling-demos-small" when-defined="vaadin-combo-box">
<template preserve-content>
<vaadin-combo-box label="Element" value="Carbon" theme="small"></vaadin-combo-box>
<script>
Expand All @@ -139,7 +139,7 @@ <h3>Small Text Field (Lumo Theme Variant)</h3>
</vaadin-demo-snippet>

<h3>Custom Theme Variant</h3>
<vaadin-demo-snippet id="combo-box-styling-demos-custom-theme-variant">
<vaadin-demo-snippet id="combo-box-styling-demos-custom-theme-variant" when-defined="vaadin-combo-box">
<template preserve-content>
<dom-module id="custom-text-field-and-item" theme-for="vaadin-text-field vaadin-combo-box-item">
<template>
Expand Down
2 changes: 1 addition & 1 deletion demo/combo-box-validation-demos.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@


<h3>Using as a Form Field</h3>
<vaadin-demo-snippet id="combo-box-validation-demos-using-as-a-form-field">
<vaadin-demo-snippet id="combo-box-validation-demos-using-as-a-form-field" when-defined="vaadin-combo-box">
<template preserve-content>
<iron-form>
<form method="post">
Expand Down

0 comments on commit 24d7a35

Please sign in to comment.