medly-components icon indicating copy to clipboard operation
medly-components copied to clipboard

feat: [Table Component] accept functions for disabling row click and selection

Open kdabir opened this issue 2 years ago • 2 comments

Description

Currently we need to provide a key which should map to a field that controls disabling the row click and selection. we should also support functions that could evaluate to true | false which can control the same behavior

image

kdabir avatar May 18 '22 06:05 kdabir

@kdabir can you provide more context as why this is required and what is the use case that is not handled by adding the key?

PulkitBanta avatar May 18 '22 06:05 PulkitBanta

There are times when there is a logic (function) that can tell if this row needs to be disabled. For example, disable the row selection if age < 18. That cannot be implemented using a key.

kdabir avatar May 19 '22 04:05 kdabir