React-table exclude default column filter - react-table

I have a default column filter and I'm wondering if there is a way from excluding it from one column.
You can check an example from React-table that I'm using: https://codesandbox.io/s/github/tannerlinsley/react-table/tree/master/examples/filtering
The 'DefaultColumnFilter' is being used in useTable hook and all columns are using it by default
Is there a way from excluding one column from using it?

Two options -
If you don't want the given column to have filters, then use disableFilters flag on that column in options.
If you want to have different type of filter for the given column, then use Filter property in the given column(as shown in provided example)

Related

Vaadin 14 Grid Component Column containing checkbox does not sort

I am using Vaadin 14 grid. This grid contains a number of columns. A few of them need to represent boolean values, hence we use a checkbox component inside that column. This is done by using grid.addComponentColumn method. The text related columns a just added using grid.addColumn
Now we want to enable multisort on the grid. By default the sorting indicators (up/down arrow) in the header are shown for the text based columns but not for the boolean values .
After adding sorting to the boolean column /component column (addComponentColumn(...).setSortable(true) the sorting indicators in the headers are shown, but the sorting itself is not performed when changing the sort direction (none / asc / desc) using the arrows in the header.
How can I make this work?
Thanks in advance!
When you have custom logic for what's rendering in a column, then you also need to explicitly configure how sorting should be handled for that column.
If you're using in-memory data, then you do that using Column.setComparator. If you're using a backend data source, then you should instead use Column.setSortProperty and also ensure that the data provider actually considers the contents of Query.getSortOrders.
You can see an example of this in practice at https://cookbook.vaadin.com/sort-with-renderer.

Howto pass the parameter of next column in Link Template in spotfire

As shown in the image if i mention {$}, it will take the current columns value and pass as a parameter to the queryString(URL). I am not able to figure out how to pass the first column (TM_TRANSMISSON_ID) value here, I tried the following and failed:
1.{$0}
2.{$TM_TRANSMISSION_ID}
3.[TM_TRANSMISSION_ID].
Can you create a calculated column so that both values are in the same column? Since that is a column property I believe you can only access the specific column.

How to count elements in group in stimulsoft report

I have some problem with function Count(). I want to make this report
Table example
In first column use function Count() in second some group of element. How I can create this?
You should use Processing Duplicates property of the text component. Set it to Merge based on Tag. The Tag property should be set to Grouping condition.

Using 'Filter by Column Value' and multi column filtering using a java vector - xPages

I have an xPage which I have built with 3 combo boxes and 1 view control. I would like to use the 'Filter by column value' option within the view control to provide the options to filter the values, allowing the user to display any combination of the combo boxes. e.g. Only comboBox1, or comboBox1 and comboBox2, or comboBox3 only, or comboBox1 and comboBox2 and comboBox3.
I used the example in the 'xPages Demonstration Application' (http://www-10.lotus.com/ldd/ddwiki.nsf/dx/xpagesdemoapp.htm or http://xpagesblog.com/XPagesHome.nsf/Entry.xsp?documentId=AAC8E26599256FDC852578CB0066CC13) to do the multi-column filtering using a vector of non-categorized columns.
So, I have come across what appears to be a fairly major issue whereby the data needs to be sorted by date. Date is not one of the filters, but it needs to be the first column in order for the data to be sorted correctly. So my first column is a string, YYYYMMDD, to ensure the data is sorted correctly. I tried to use the sort option within the view control and that does not appear to work with the column filtering implemented in this manner.
So, as Date one of the criteria I am filtering by, I have passed that as an empty string - using the thought process that an empty string will select all (as in the url examples above).
The code I have used to do the filtering is:
var vtr:java.util.Vector = new java.util.Vector();
var t1 = sessionScope.Email;
var t2 = sessionScope.Own;
var t3 = sessionScope.Module;
vtr.addElement("");
#If(sessionScope.Own=="My calls",vtr.addElement(t1),vtr.addElement(""));
#If(sessionScope.Own=="My calls",vtr.addElement(""),vtr.addElement(t2));
#If(sessionScope.Status=="Open",vtr.addElement("Open"),vtr.addElement(""));
#If(sessionScope.Module=="All",vtr.addElement(""),vtr.addElement(t3));
return vtr;
What I have found is that not all data is being returned. I thought this might be due to the date field. So I removed it (changing the view and removing the first add element), and yet I still find that not all data is being returned. I suspect that this might be due to the empty strings being passed, or, that this does not actually work the way I had hoped.
Does anyone know if I can get this working the way I want it to, and if not, do you have any suggestion on how I can go about this?
Date is not needed as the first sortable column in the view. The first column does need to be sorted for the lookup to work just like the Notes view needs to be sorted for #DbColumn and #DbLookup to work. XPages uses the same underlining architecture. This example - http://dev.openntf.org/demos/demoapp.nsf/viewFilteringVector.xsp - works without the data being sorted by Date.
My guess as to why your example isn't working is down to how your Notes view sorted. Try creating a new view with column 1 (email) ascending sort, column 2 (own) ascending sort, and column 3 (module) again ascending sort. You should be able to get vector filtering working in this situation.
If all that doesn't work for you, you might consider multi-layer category filtering (new to 853). This filtering type in XPages is related to how categoryFilter works but allow you to filter a view by the sub-category (or sub-categories) too. This technique might suit your scenario better. Hope this helps.

Get column datatype, sort direction onload, change sort order on first click of header in tablesorter

I have a grid view, which has several columns, one of which is a numeric column. When the grid loads first time, the data on the numeric column gets sorted on the server side itself and gets rendered. I apply client side sorting on another column also using table sorter. Now, the requirement is, because the number column comes already sorted in ascending order, upon clicking the number column header should sort it in descending order first. How can I achieve this? I thought of doing it in the following way, but getting no help.
1. How to find out the data type of a column by giving column or index using table sorter?
2. Identify whether a column is already sorted on load and if so, the sort direction of a that column.
3. Sort that column (mentioned above) in descending order, upon first time header click of that column.
I did try with debug option of table sorter, but it is simply giving some alert message, which is not much helpful.
Any help would be really appreciated.
Set the initial sort order in tablesorter to be the same as what is returned back from the server. For example, say your numeric column is column zero and you are returning it back from the server in desc order. Use the following in the table sorter config:
sortList:[[0,1]]
This will tell tablesorter to sort the first column in descending order. Now that tablesorter knows how the data is sorted, the next time you click on this column to sort it, it will sort in ascending order (since it's currently sorted in descending order).

Resources