- Home
- Forum
- Angular - EJ 2
- Can't remove bottom line on autocomplete component for all states.
Can't remove bottom line on autocomplete component for all states.
I just want to remove the underline of the autocomplete component but it won't go away.
<div class="header">
<div class="input-container">
<ejs-autocomplete placeholder="Table Name" floatLabelType="Auto" class="autocomplete" CssClass="e-custom" ></ejs-autocomplete>
<ejs-dropdownlist #owner
id="owner"
placeholder="Owner"
[allowFiltering]="true"
[dataSource]='["ALL","t2", "t3"]'
[fields]="{ value: 'id', text: 'label' }"
[value] = '"ALL"'
cssClass = ''>
</ejs-dropdownlist>
</div>
</div>
======================================= STYLES
.header{
width: 100%;
padding-top: 4rem;
padding-bottom: 4rem;
display: flex;
flex-direction: column;
background-color: #a2bac2;
align-items: center;
.input-container{
width: 60%;
height: 3rem;
display: flex;
background-color: white;
border-radius: 10px;
ejs-autocomplete{
flex-grow: 1;
height: 100%;
border: none;
}
ejs-dropdownlist{
flex-grow: .5;
height: 100%;
border: none;
span{
height: 100% !important;
}
.e-input-group .e-control-wrapper .e-ddl .e-lib .e-keyboard .e-valid-input{
height: 100% !important;
}
.e-ddl.e-input-group.e-control-wrapper.e-input-focus::before, .e-ddl.e-input-group.e-control-wrapper.e-input-focus::after {
display: none;
}
.e-input-group:not(.e-float-icon-left), .e-input-group.e-success:not(.e-float-icon-left),
.e-input-group.e-warning:not(.e-float-icon-left), .e-input-group.e-error:not(.e-float-icon-left),
.e-input-group.e-control-wrapper:not(.e-float-icon-left), .e-input-group.e-control-wrapper.e-success:not(.e-float-icon-left),
.e-input-group.e-control-wrapper.e-warning:not(.e-float-icon-left),
.e-input-group.e-control-wrapper.e-error:not(.e-float-icon-left) {
border: none !important;
}
}
}
}
.e-custom.e-input-group:not(.e-float-icon-left):not(.e-float-input)::before,
.e-custom.e-input-group:not(.e-float-icon-left):not(.e-float-input)::after{
background:none;
border:none;
}
Hi Jason Nham,
Greetings from Syncfusion Support!
We've carefully reviewed your query about removing the underline from the autocomplete component, and we've prepared a sample that addresses your requirement. Please find the modified code snippet below:
|
.e-input-group:not(.e-float-icon-left), .e-input-group.e-control-wrapper:not(.e-float-icon-left) { border-bottom: none; } .e-input-group.e-input-focus:not(.e-float-icon-left):not(.e-success):not(.e-warning):not(.e-error), .e-input-group.e-control-wrapper.e-input-focus:not(.e-float-icon-left):not(.e-success):not(.e-warning):not(.e-error) { border-style: none; } .e-float-input.e-control-wrapper.e-input-group:not(.e-float-icon-left) .e-float-line::after, .e-float-input.e-control-wrapper.e-input-group:not(.e-float-icon-left) .e-float-line::before { background: none; }
|
You can view the implementation in the provided StackBlitz sample: https://stackblitz.com/edit/angular-bbvnxh-syt5bw?file=src%2Fapp.component.html,package.json,src%2Fapp%2Fapp.module.ts,src%2Fapp.component.ts,src%2Fapp.component.css
If you have any further questions or if there's anything else we can assist you with, please don't hesitate to reach out.
Regards,
Kokila Poovendran.
- 1 Reply
- 2 Participants
-
JN Jason Nham
- Nov 15, 2023 05:14 PM UTC
- Nov 16, 2023 09:41 AM UTC