function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
firstqa systemfirstqa system 

lightning pagination datatable

renderedCallback(){
this.template.querySelector('lightning-button.Previous').disabled = true;
}

if i include this line in my code i am getting error as  Error during LWC component connect phase: [Cannot set property 'disabled' of null]

what to do how to rectify this

for full code refer this :https://medium.com/@rs60033/pagination-in-lwc-lightning-web-component-7a6dcb5a9385

and please help me how to rectify this 

syed e h mazhari
mazharibobby829@gmail.com
8328174785

 
Abdul KhatriAbdul Khatri
The error referring that it didn't find the component as it is coming null, property cannot be set for null. 
this.template.querySelector('lightning-button.Previous')
Can you please make sure the name is defined on html page with the same name as javascript is case sensitive.
<lightning-button label="Previous" icon-name="utility:chevronleft" onclick={previousHandler1}></lightning-button>
I hope this help

 
firstqa systemfirstqa system
Hello abdul khatri thanks for you suggetion i tried but still i am gettimg same error as Cannot set property 'disabled' of null i tried to call with same name but i am getting that error 

thanks for your help