mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Add ability to handle enter key propagation for input model components (#7524)
* Add ability to stop enter key propagation for input model components * Fix spacing * onInputEntered -> onEnterKeyPressed
This commit is contained in:
@@ -130,7 +130,18 @@ export class ManageAccessDialog {
|
||||
rootContainer.addItem(typeContainer, { flex: '0 0 auto' });
|
||||
const addUserOrGroupInputRow = modelView.modelBuilder.flexContainer().withLayout({ flexFlow: 'row' }).component();
|
||||
|
||||
this.addUserOrGroupInput = modelView.modelBuilder.inputBox().withProperties<azdata.InputBoxProperties>({ inputType: 'text', placeHolder: enterNamePlaceholder, width: 250 }).component();
|
||||
this.addUserOrGroupInput = modelView.modelBuilder.inputBox()
|
||||
.withProperties<azdata.InputBoxProperties>(
|
||||
{
|
||||
inputType: 'text',
|
||||
placeHolder: enterNamePlaceholder,
|
||||
width: 250,
|
||||
stopEnterPropagation: true
|
||||
}).component();
|
||||
this.addUserOrGroupInput.onEnterKeyPressed((value: string) => {
|
||||
this.hdfsModel.createAndAddAclEntry(value, this.addUserOrGroupSelectedType);
|
||||
this.addUserOrGroupInput.value = '';
|
||||
});
|
||||
const addUserOrGroupButton = modelView.modelBuilder.button().withProperties<azdata.ButtonProperties>({ label: addLabel, width: 75 }).component();
|
||||
addUserOrGroupButton.onDidClick(() => {
|
||||
this.hdfsModel.createAndAddAclEntry(this.addUserOrGroupInput.value, this.addUserOrGroupSelectedType);
|
||||
|
||||
Reference in New Issue
Block a user