modus-web-components icon indicating copy to clipboard operation
modus-web-components copied to clipboard

Add support for disabling rows with respect to selection in Modus Table

Open SamP-Trimble opened this issue 7 months ago • 1 comments

Prerequisites

Proposal

I would like to request a new feature in the Modus Web Components Table that allows a row to be disabled when 'row-selection' is enabled. The behavior would be that a Modus Table with 'row-selection' enabled will check each row to see if they are enabled. If a row is disabled, it would not be able to be selected.

Motivation and context

In many applications, tables serve a mixed use of displaying data and allowing that data to be edited or selected. Such a use case can lead to a table where some of the rows are only for display (read-only) while the others can be selected or edited. Being able to display read-only rows and selectable rows together would make the context of those rows clearer and simplify page layouts.

What is the issue regarding ?

@trimble-oss/modus-web-components

Priority

High

What product/project are you using Modus Components for ?

ISO15143-4

What is your team/division name ?

CCFS-CS, Team Moa

Are you willing to contribute ?

Yes

Are you using Modus Web Components in production ?

No

SamP-Trimble avatar May 05 '25 21:05 SamP-Trimble

Hello @SamP-Trimble! Thanks for opening an issue. The Modus core team will get back to you soon (usually within 24-hours) and provide guidance on how to proceed. Contributors are welcome to participate in the discussion and provide their input on how to best solve the issue, and even submit a PR if they want to.

Please wait until the issue is ready to be worked on before submitting a PR, or you can reach out to the core team if it is time bound. For trivial things, or bugs that don't change the expected behaviors and UI, you can go ahead and make a PR.

github-actions[bot] avatar May 05 '25 21:05 github-actions[bot]

@SamP-Trimble Could you check this video I have attached below, if it meets your expectations?

https://github.com/user-attachments/assets/71a6b30f-79ec-44dc-97ff-e818e6fed1fd

It works using the value we are providing in the function rowSelectionDisabled which is now added into the table. Here in the provided example, I have disabled the row using the age value. Likewise, any value in the row can be used to find and disable the row.

Image

Kavin-Trimble avatar May 20 '25 07:05 Kavin-Trimble

Hi Kavin, Yes, the functionality you show in the video is what we need so it looks good to me

SamP-Trimble avatar May 20 '25 20:05 SamP-Trimble