Input field/ Search Field

So I have this view (sorry for the mess). When you click on a row on the table, the input fields on the right populate themselves. But now I want to be able to input/ choose a dropdown on the right input fields and the table to filter accordingly. What are the easiest ways to do so.

Bind the table's filter.text to the dropdown's value property with a property binding.

If you want to save future you some trouble then do it this way.

  • On the view, create custom.tableFilter.
  • On the dropdown create a property binding on value and point it to view.custom.tableFilter. Set it to 'bidirectional` so that the dropdown can write to the custom property.
  • Now bind the table's filter.text to the custom property.

This method avoids all the getChild / getSibling syntax which breaks when you move components in and out of containers.

1 Like

I want the filter to work on all the input fields, maybe not all at the same time. Will this be able to do so?

You're kind of changing the question here.

It sounds like you should use the dropdown values as parameters in the query that's populating the table. In other words, reload the table every time a dropdown selection changes.
The dropdowns can have their option lists populated by queries to find each unique instance in the columns.

Are you aware that the table has built in column filtering? Each column's filter can set up separately. Start with columns.0.filter.enabled : true.

Yes, I am aware of the built in column filtering.

I think using them as parameters would be a good idea. But I also need to figure out some things on the design end from the requirements as I am also unclear on whether my stakeholders want a display of AssetDetails or a input field.

I think this topic is solved though, so thank you for your help!

Don't forget to add a Filter reset button with an event script to clear all the filters (which will trigger a table binding refresh).

2 Likes

TIL about the kbd tag.

2 Likes