Part - 2 : Players LWC Project (Hindi) | Style LWC using CSS | Use Of Template QuerySelector In LWC

Поділитися
Вставка
  • Опубліковано 30 вер 2024

КОМЕНТАРІ • 7

  • @ravindrap5557
    @ravindrap5557 8 місяців тому +1

    In my Js boxClass variable things are not working. I Tried to put console.log before and after the
    let boxClass = this.template.querySelectorAll('.selected');
    if(boxClass.length >0){
    this.removeClass();
    }
    console.log('checking the line 31')
    let playerBox = this.template.querySelectorAll(`[data-id="${this.selectedPlayerId}"]`);
    if(playerBox){
    playerBox.className= 'title_wrapper selected';
    }
    console.log('checking the line 40');
    still comments are getting printed but functionality is not any idea where the problem is ?

    • @SalesforceNoob
      @SalesforceNoob  8 місяців тому

      You have used "template.querySelectorAll" instead "template.querySelector" ->
      let playerBox = this.template.querySelector(`[data-id="${this.selectedPlayerId}"]`);

  • @sandippaswan509
    @sandippaswan509 7 місяців тому

    I have used Text rich data type for image upload ....lekin yaha css.... .tile img{
    } Use kar ke same size ke image nahi mil rahe. Any idea how to css apply for getting the same size of all images.

  • @Coder_DhruvArora
    @Coder_DhruvArora Рік тому +1

    My slds classes are not getting applied
    Any idea, what's the issue?

  • @shivam_diwan
    @shivam_diwan 8 місяців тому

    Can you explain a little bit about the data-id attribute..how it works