import { LightningElement,api } from 'lwc';
|
|
export default class Jzlookuplightning extends LightningElement {
|
|
selectValue = '';
|
|
|
@api objectname = '';
|
@api fieldname = '';
|
|
|
connectedCallback()
|
{
|
this.setIntervalFn();
|
|
}
|
|
setIntervalFn()
|
{
|
setInterval(()=>{
|
const inputFields = this.template.querySelectorAll(
|
'lightning-input-field'
|
);
|
if (inputFields) {
|
inputFields.forEach(field => {
|
|
if (this.selectValue != field.value) {
|
this.selectValue = field.value
|
|
const getSearchParamsEvent = new CustomEvent('searchchange', {
|
detail: {value:this.selectValue}
|
});
|
this.dispatchEvent(getSearchParamsEvent);
|
}
|
});
|
}
|
|
},500);
|
|
}
|
|
handleSubmit(event) {
|
event.preventDefault();
|
console.log(JSON.stringify(event.detail.fields.Hospital__c));
|
}
|
|
@api setvalue(value){
|
this.selectValue = value;
|
}
|
@api getvalue(){
|
return this.selectValue;
|
}
|
|
@api todisabled()
|
{
|
var inputs = this.template.querySelectorAll('lightning-input-field');
|
inputs.forEach(inputFile=>{
|
inputFile.disabled = true;
|
})
|
this.ondisabledShow = true;
|
}
|
}
|