I am facing issues while trying to use angular-material Autocomplete
for doing inline edit.
Created plunk for the same: Material Autocomplete for Inline Edit - ag-grid
Tried providing various values for isPopup?(): boolean { return false; }
for #1 and getValue() { return this.selectedValue; }
for #2, but not getting any clue what's the actual issue is.
What I want is,
The first case could be solved via overriding
.cdk-overlay-pane
, just addstyles
block to yourAutocompleteEditor
component
styles: [`
::ng-deep .cdk-overlay-pane {
/* Do you changes here */
position: fixed; // <- only this one is crucial
z-index: 1000;
background:white
}
`],
Partially got answer from here
The second, you have to take care of
focus
by your self, so the easiest way to create anotherViewChild
reference and add it to material input as example#cInput
@ViewChild('cInput') public cInput;
afterGuiAttached?(): void {
this.cInput.nativeElement.focus();
}
The third case, use option instead of
value
inside_autoCompleteChanged
function
_autoCompleteChanged(option) {
this.selectedValue = option;
}