You need to sign in to do that
Don't have an account?
Ishav Singh
I have two sections with same lightning-input field. I need error to be shown only to the field which is currently been input by the user
HTML:
<template for:each ={checks.options} for:item="check" >
<ul key={check}>
<lightning-input type="text" data-id={checks.items} label="Numbers"
value={check.totalsize} onclick={valuecheck} onblur={callValidations}>
</lightning-input>
<template if:true={errorMessage}>
{msg}</template>
<template if:true={successMessage}>
{msg}
</template>
</template>
This number field will be displayed multiple times as it will be iterated with options node. However, at one time I need to show error or success message for one particular node. Can anyone suggest on this,
<template for:each ={checks.options} for:item="check" >
<ul key={check}>
<lightning-input type="text" data-id={checks.items} label="Numbers"
value={check.totalsize} onclick={valuecheck} onblur={callValidations}>
</lightning-input>
<template if:true={errorMessage}>
{msg}</template>
<template if:true={successMessage}>
{msg}
</template>
</template>
This number field will be displayed multiple times as it will be iterated with options node. However, at one time I need to show error or success message for one particular node. Can anyone suggest on this,