Skip to content

Commit

Permalink
fixed bug in filter not showing old filter value. Added more samples.…
Browse files Browse the repository at this point in the history
… Ticked version numbers.
  • Loading branch information
Tony Germaneri committed Aug 4, 2017
1 parent 80c9857 commit 4df8126
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "canvas-datagrid",
"main": "lib/main.js",
"version": "0.13.1",
"version": "0.13.2",
"ignore": [
"**/.*",
"node_modules",
Expand Down
1 change: 1 addition & 0 deletions dist/canvas-datagrid.debug.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/canvas-datagrid.debug.map

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions lib/contextMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,7 @@ define([], function () {
self.setFilter(e.cell.header.name, filterInput.value);
});
filterInput.addEventListener('keyup', createAutoCompleteContext);
filterInput.value = self.columnFilters[e.cell.header.name] || '';
filterLabel.innerHTML = self.attributes.filterOptionText.replace(/%s/g, n);
filterAutoCompleteButton.onclick = function () {
if (autoCompleteContext) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "canvas-datagrid",
"version": "0.13.1",
"version": "0.13.2",
"description": "Canvas based data grid",
"main": "./lib/main.js",
"scripts": {
Expand Down
12 changes: 12 additions & 0 deletions tutorials/sample.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,18 @@ document.addEventListener('DOMContentLoaded', function () {
}
});
};
examples['Use a textarea to edit cells instead of an input.'] = function (parentNode) {
var grid = canvasDatagrid({
parentNode: parentNode,
multiLine: true,
data: [
{col1: 'foo\nbar', col2: 0, col3: 'a'},
{col1: 'bar\nfoo\nbar', col2: 1, col3: 'b'},
{col1: 'baz\nfoo\nbar', col2: 2, col3: 'c'}
]
});
grid.style.cellHeight = 80;
};
examples['Use select instead of input for edits|When a column in the schema includes an <i>enum</i> property, a drop down menu will appear instead of the normal input or textarea.'] = function (parentNode) {
var grid = canvasDatagrid({
parentNode: parentNode,
Expand Down

0 comments on commit 4df8126

Please sign in to comment.