Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MultiSelect Combo should support clearing input text on selection #2494

Closed
pmiklashevych opened this issue Mar 5, 2021 · 1 comment
Closed

Comments

@pmiklashevych
Copy link

https://www.bryntum.com/forum/viewtopic.php?f=43&t=16841&p=83758#p83758

Add a config to clear text on item selection similar to clearTextOnPickerHide

Try the code below without the listener first. Type in "Ja" and select "Java". See "Java" is selected but "Ja" is in the input.

import Combo from '../../lib/Core/widget/Combo.js';

new Combo({
    listeners : {
        select() {
            if (this.multiSelect) {
                this.input.value = '';
            }
        }
    },
    appendTo    : 'container',
    multiSelect : true,
    style       : 'margin-top:3em',
    label       : 'Skills - multiSelect',
    value       : ['Javascript', 'SQL'],
    items       : [
        'BASIC',
        'COBOL',
        'FORTRAN',
        'DBL',
        'SQL',
        'C/C++',
        'Java',
        'Javascript'
    ],
    width : '100%'
});
@matsbryntse
Copy link
Member

Dupe #1335

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants