You need to sign in to do that
Don't have an account?
VVH
not greyed out after disabling
I want to disable some onrow action after meeting some criteria. The fuctionality is working fine as it's not permorning actions after disabling but i need to change the color. it should be greyed out when its disabled. how can this be done?
HTML:
<c-custom-data-table
class="apo-data-table__slds"
key-field="index"
data={tableData}
columns={columns}
onrowaction={handleRowAction}
disabled={disableAction}
editable="true"
onsave={handleSave}
oninputchanged={handleNameChange}
sorted-by={sortBy}
sorted-direction={sortDirection}
onsort={doSorting}
onrowselection={getSelectedRows}
>
</c-custom-data-table>
JS:
@track disableAction=true;
handleRowAction(event) {
switch (actionName) {
case 'Preview':
if(condition){
this.disableAction = false;
this.methodname(record_id);
}
break;
}
HTML:
<c-custom-data-table
class="apo-data-table__slds"
key-field="index"
data={tableData}
columns={columns}
onrowaction={handleRowAction}
disabled={disableAction}
editable="true"
onsave={handleSave}
oninputchanged={handleNameChange}
sorted-by={sortBy}
sorted-direction={sortDirection}
onsort={doSorting}
onrowselection={getSelectedRows}
>
</c-custom-data-table>
JS:
@track disableAction=true;
handleRowAction(event) {
switch (actionName) {
case 'Preview':
if(condition){
this.disableAction = false;
this.methodname(record_id);
}
break;
}
Hi Shreevarsha,
Please specify which action you want to grey out. whether it is any button or image or any field or the complete row ?
It will be great if you can share the component code and the snapshot of your UI with marking which section you want to grey out.
Regards,
Priya Ranjan