0

Here is my code where onclick is added:

                          <div class="slds-form-element">
                            <label class="slds-form-element__label" for="text-input-id-1">Enter city</label>
                            <div class="slds-form-element__control slds-input-has-icon slds-input-has-icon_left-right">
                              <svg class="slds-icon slds-input__icon slds-input__icon_left slds-icon-text-default" aria-hidden="true">
                                <use xlink:href="/assets/icons/utility-sprite/svg/symbols.svg#search"></use>
                              </svg>
                              <input type="text" id="text-input-id-1" placeholder="Placeholder text…" class="slds-input" />
                              <button class="slds-button slds-button_icon slds-input__icon slds-input__icon_right" title="Clear" onclick={handleChange}>
                                <svg class="slds-button__icon slds-icon-text-light" aria-hidden="true">
                                  <use xlink:href="/assets/icons/utility-sprite/svg/symbols.svg#clear"></use>
                                </svg>
                                <span class="slds-assistive-text">Clear</span>
                              </button>
                            </div>
                          </div>

enter image description here

Here is the code from the documentation: click

Why is there no search and clean logo and why does onclick not work?

0

Copying code from the SLDS blueprints do not translate to working components, they are more like guidelines.

the searhc icon does not display because the asset folder does not exist in your SF org, instead use (replace assets with _slds):

 <svg class="slds-icon slds-input__icon slds-input__icon_left slds-icon-text-default" aria-hidden="true">
      <use xlink:href="/_slds/icons/utility-sprite/svg/symbols.svg#search"></use>
 </svg>

as per your onclick not working, not sure what you are expecting it to do? where is your js controller?

Blueprints are note meant to work ootb.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.