Open rmkraus opened 4 years ago
I have a similar problem: When using different name and value in the choices it will not count the choice as checked. It show it selected but never really select the items...
from PyInquirer import prompt
print(prompt([
{
'type': 'checkbox',
'name': 'ids',
'message': 'ids:',
'choices': [
{'name': '100000001', 'value': '100000001', 'checked': True},
{'name': '100000002', 'value': '100000002', 'checked': False},
{'name': '100000003', 'value': '100000003', 'checked': False},
{'name': '100000004', 'value': '100000004', 'checked': True},
]
}
]))
? ids: done (2 selections) {'ids': ['100000001', '100000004']}
from PyInquirer import prompt
print(prompt([
{
'type': 'checkbox',
'name': 'ids',
'message': 'ids:',
'choices': [
{'name': 'name_1', 'value': '100000001', 'checked': True},
{'name': 'name_2', 'value': '100000002', 'checked': False},
{'name': 'name_3', 'value': '100000003', 'checked': False},
{'name': 'name_4', 'value': '100000004', 'checked': True},
]
}
]))
? ids: done (2 selections) {'ids': []}
Dear @CITGuru, I saw you fixed it in the master branch... Is it possible to release a minor version 1.0.4 with the fix to pypi?
@realgam3 this will be released soon.
I use the following array for choices:
Note that all entries have checked set to True. However, when PyInquirer displays the menu, none of the options are checked.
$ pip3 freeze ansible==2.9.9 cachetools==4.1.0 certifi==2020.4.5.1 cffi==1.14.0 chardet==3.0.4 cryptography==2.9.2 dictdiffer==0.8.1 dnspython==1.16.0 google-auth==1.15.0 idna==2.9 Jinja2==2.11.2 jmespath==0.10.0 kubernetes==11.0.0 MarkupSafe==1.1.1 oauthlib==3.1.0 openshift==0.11.0 prompt-toolkit==1.0.14 pyasn1==0.4.8 pyasn1-modules==0.2.8 pycparser==2.20 Pygments==2.6.1 PyInquirer==1.0.3 python-dateutil==2.8.1 python-hpilo==4.3 python-string-utils==1.0.0 PyYAML==5.3.1 regex==2020.5.14 requests==2.23.0 requests-oauthlib==1.3.0 rsa==4.0 ruamel.yaml==0.16.10 ruamel.yaml.clib==0.2.0 six==1.14.0 urllib3==1.25.9 wcwidth==0.1.9 websocket-client==0.57.0