Lowercase value of 'show-now-as-default'

To match the boolean value in JavaScript.
This commit is contained in:
Tom Byers
2020-07-16 19:27:33 +01:00
committed by Chris Hill-Scott
parent e45bbcf99e
commit b5360c14cc
3 changed files with 5 additions and 4 deletions

View File

@@ -87,7 +87,7 @@
let name = $component.find('input').eq(0).attr('name');
let mousedownOption = null;
let showNowAsDefault = (
$component.data('show-now-as-default').toLowerCase() === 'true' ?
$component.data('show-now-as-default').toString() === 'true' ?
{'name': name} : false
);
const reset = () => {
@@ -131,7 +131,8 @@
'choices': choices.filter(
element => element.label.toLowerCase().indexOf(day) > -1
),
'name': name
'name': name,
'showNowAsDefault': showNowAsDefault
});
focusSelected(component);