Created on 06-21-2017 07:44 AM - edited 08-17-2019 07:02 PM
Hi, I want to add one more column on the SearchResult page. I've seen from the router that route
'!/search/searchResult': 'searchResult'
this searchResult uses SearchDetailLayout (view) and it finally uses SearchResultLayoutView to render all of the columns on the page.
Now, I want to add one more column here.. say "testCol". Could anyone please guide me on
1) How can I make my changes reflect on UI?
2) How is the information to be displayed here is fetched on UI?
Created 06-21-2017 10:29 AM
Atlas project dashboardv2 contains all views that are rendered on dashboard UI. Search views can be found inside 'dashboardv2\public\js\views\search' folder. Just edit 'SearchResultLayoutView.js' and add new column just like other columns that are already added. After changes create a new package and it should reflect on browser. Make sure to clear your browser cache.
Created 06-21-2017 11:00 AM
Hi @Saba Baig if you want to add one more column in Search table then first make sure that your api will return "testCol" attribute same like name, description etc.
Once your done with API then go to SearchResultLayoutView.js. and in getFixedDslColumn funciton add your column.
I am assuming your attribute value is string. so here you go.
col['testCol'] = { label: "your Label", // you can see this label on table header cell: "String", editable: false, sortable: false, };
So based on col['testCol'] it will get the testCol value from model and display in table cell recursively.
Note : If your attribute value is not string or you want to modify cell output then see this example: