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;

}


Screenshot 2023-11-15 at 12.13.56 PM.png




1 Reply

KP Kokila Poovendran Syncfusion Team November 16, 2023 09:41 AM UTC

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-bottomnone;

}

.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-stylenone;

}

.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 {

  backgroundnone;

}

 


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.


Loader.
Up arrow icon