Skip to content

Instantly share code, notes, and snippets.

View adriatic's full-sized avatar
💭
I may be slow to respond.

Nikolaj Ivancic adriatic

💭
I may be slow to respond.
  • Congral, LLC
  • Ann Arbor, MI
  • 11:06 (UTC -04:00)
View GitHub Profile
@adriatic
adriatic / app.css
Last active July 19, 2016 18:49
autocomplete - api
.box .k-textbox {
width: 80px;
}
.box .k-button {
min-width: 80px;
}
li {
margin: 0;
padding: 0;
list-style: none;
@adriatic
adriatic / app.html
Last active July 19, 2016 18:34
autocomplete basic-use
<template>
<div id="example">
<div class="demo-section k-content">
<p><strong>People:</strong></p>
<ak-autocomplete k-data-source.bind="items">
<input style="width: 100%;">
</ak-autocomplete>
<p class="demo-hint" style="word-break: break-all">Type a name, available values in the list are: ${ items } </p>
</div>
</div>
@adriatic
adriatic / app.html
Last active July 19, 2016 18:49
Autocomplete: events
<template>
<require from="./logger.js"></require>
<div id="example">
<div class="demo-section k-content">
<p><strong>Select a state in USA:</strong></p>
<ak-autocomplete k-data-source.bind="items"
k-on-open.delegate="logger.log('open')"
k-on-close.delegate="logger.log('close')"
k-on-change.delegate="logger.log('change')"
k-on-select.delegate="onSelect($event.detail)"
@adriatic
adriatic / app.html
Last active July 19, 2016 18:49
Autocomplete: server filtering
<template>
<div id="example">
<div class="demo-section k-content">
<p><strong>Find a product:</strong></p>
<ak-autocomplete k-data-source.bind="datasource";
k-data-text-field="ProductName";
k-filter="contains";
k-min-length.bind="3">
<input style="width: 100%;"></input>
</ak-autocomplete>
@adriatic
adriatic / app.html
Last active July 19, 2016 18:49
Autocomplete: virtualization
<template>
<div id="example">
<div class="demo-section k-content">
<h4>Search for shipping name</h4>
<ak-autocomplete k-data-source.bind="datasource"
k-virtual.bind="virtual"
k-data-text-field="ShipName"
k-height.bind="520">
<ak-template>
@adriatic
adriatic / app.html
Last active July 19, 2016 18:49
Autocomplete: grouping
<template>
<div id="example">
<div class="demo-section k-content">
<p><strong>Find a customer:</strong></p>
<ak-autocomplete k-data-source.bind="datasource"
k-height.bind="400"
k-data-text-field="ContactName">
<input style="width: 100%">
</ak-autocomplete>
@adriatic
adriatic / app.html
Last active July 19, 2016 18:49
Autocomplete: value binding
<template>
<div id="example">
<div class="demo-section k-content">
<p><strong>People:</strong></p>
<ak-autocomplete k-data-source.bind="items"
k-value.two-way="selectedValue">
<input style="width: 100%;">
</ak-autocomplete>
@adriatic
adriatic / app.html
Last active July 19, 2016 18:49
Autocomplete: highlighting
<template>
<div id="example">
<div class="demo-section k-content">
<ak-autocomplete k-data-source.bind="data"
k-filter="startswith"
k-placeholder="Select country..."
k-separator=", ">
<ak-template>
<span innerhtml.bind="formatValue($$item, textbox)"></span>
</ak-template>
@adriatic
adriatic / app.html
Last active July 19, 2016 18:49
Area charts: basic use
<template>
<ak-chart k-title.bind="{text: 'Gross Domestic product growth \n /GDP annual %/'}"
k-legend.bind="{position: 'bottom'}"
k-series-defaults.bind="seriesDefaults"
k-series.bind="series"
k-value-axis.bind="valueAxis"
k-category-axis.bind="categoryAxis"
k-tooltip.bind="tooltip">
</ak-chart>
</template>
@adriatic
adriatic / app.html
Last active July 19, 2016 18:49
Area charts: binding to grouped data
<template>
<ak-chart k-title.bind="{text: 'Stock Prices'}"
k-data-source.bind="datasource"
k-legend.bind="{position: 'bottom'}"
k-series.bind="series"
k-value-axis.bind="valueAxis"
k-category-axis.bind="categoryAxis"
k-tooltip.bind="tooltip">
</ak-chart>
</template>