Skip to content

Commit

Permalink
try to prevent un-remembered selections (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
hobbyquaker committed Aug 31, 2018
1 parent ca8e856 commit 220a5a8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
11 changes: 7 additions & 4 deletions nodes/ccu-rpc-event.html
Original file line number Diff line number Diff line change
Expand Up @@ -107,26 +107,29 @@
const $type = $('#' + id + 'Rx');
const name = id.split('-').pop() + 'Rx';
$type.val(that[name]);

const $this = $(this);
const $input = $this.parent().find('.red-ui-typedInput-input input');

$this.typedInput({
typeField: $type,
types: ['str', 're']
}).typedInput('width', '70%');

$this.parent().find('.red-ui-typedInput-input input').autocomplete({
$input.autocomplete({
source: [],
close: () => {

$input.trigger('change');
},
delay: 0,
minLength: 0
});

$this.on('change', (type, value) => {
if (value === 're') {
$this.parent().find('.red-ui-typedInput-input input').autocomplete('disable');
$input.autocomplete('disable');
} else {
$this.parent().find('.red-ui-typedInput-input input').autocomplete('enable');
$input.autocomplete('enable');
}
});
});
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "node-red-contrib-ccu",
"version": "1.4.1",
"version": "1.4.2",
"description": "Node-RED Nodes for the Homematic CCU",
"repository": "https://github.com/hobbyquaker/node-red-contrib-ccu",
"keywords": [
Expand Down

0 comments on commit 220a5a8

Please sign in to comment.