Current Salesforce flow
The above structure aims to create a datatable with a filter for its records. I am currently using the first screen component to set a variable. And I am showing the correct records on the second screen component accordingly.
Question
Is there a way I can filter the datatable records without separating the logic into two screens?
Related
I'm trying to create this functionality in React Tables:
This functionality has been created for another table that is not using useFilters. But now I want to use React useGlobalFilter functionality for this.
I followed this tutorial for that purpose, and now my tables are being correctly filtered using globalFilters.
But the highlight functionality is not working properly. My cell render receives an HTML like this:
<mark>Reg</mark>istered
so if I try to filter by: Registered, it will never work, as plain text contains <mark> HTML tags.
So I'm trying to combine both functionalities playing with Column filters based on dataSource instead of column value, but with no luck.
Note:
My render functionality accepts any component to render content. That's why I can draw HTML content inside.
I want my filter to search based on dataSource or a specific value I set
Any clues on how to get this?
I am using ag-grid enterprise in my project where i am inserting data into the grid. Once the editing of data is completed i am pressing submit button to save the entries in the backend. Before saving there are some validations which i am performing by passing gridApi to the method and there gridApi.foreEachNode i am validating the data. I have a new scenario where if all the cells of the row is empty. The row should be deleted so that user should not have to delete every empty row before submitting. how can i delete the row node inside foreEachNode?
I recommend that build up an array of row ids for the empty rows as you iterate through forEachNode, and then once you are done iterating, use the ids from the array to delete the rows.
However, I'd like to recommend an entirely different approach...
That is, don't treat the grid as the "source of truth" for your data.
Rather, keep a data model in your application, and use the grid just as a visual component (though a complex one), that represents the data in your model.
React is particularly suited for this, as you can use, e.g. Redux to represent your model and provide operations on it.
In this scenario, you would do these operations on your model, and then update the grid with the new value of your model. And your model would then be in a good state to send to your back-end.
I have a grid with many columns, and a popup dialogue for adding new records.
I have set deafultValues on data models fields array works fine, now I am trying to reuse that and add this defaults values dynamically from the server.
I have entityName/def available in the server that have the feilds name with default values in it.
I have so many entities,
so proxy transform function would be best ? or when creating the the dialogue form window, call the the server to populate the fields ?
I am new to ExtJS and Sencha and I don't have a clear way to both mentioned ways. I am buzzled!!
Any answers, hints are truly appreciated.
I have a angular page which shows 1000 of nested record (parent- child up to n-level) and further user can add/edit/delete the record from UI at any location. Each row contains a button to add row above/below, based on that new row is created. This UI has also drag and drop functionality over each row so if any row is draged over another then parent child rows created. For this we have a json collection in nested way and in UI we have created a directive which is called recursively to show the nested record using ng-repeat.
We are facing performance issue here, if user try to add a new row at any specific point we are adding a new blank row in json data on specified index and based on this blank row a blank form is shown which renders very slowly.
Functionality is working but whenever a new add/update/deleted happens over row then it stuck and takes time to re-render the UI.
I cannot implement pagination here to restrict rows as user can create parent child relation by dragging over any row so all record should be shown.
Any one can suggest if other way around for this performance issue?
I have following requirement.
Display data in a table
Clicking on checkbox filter out currently displayed rows by some condition
Clicking on checkbox once again return data appearance to it's previous state
To achieve this I've ovverided method rowQualifies in my ViewObject which is simple SQL based view object to apply my custom filter logic.
When user clicks on checkbox I refresh view object data to apply filter
viewObject.setDoFiltering(true);
viewObject.setQueryMode(ViewObject.QUERY_MODE_SCAN_VIEW_ROWS);
viewObject.executeQuery();
It works perfectly, data set updates without interacting with database and my custom filter logic applies as well.
But when I need to cancel filter it wouldn't work because iterator doesn't contain anymore previous rows, and I can only load them from database but it means that I can lose my changes already made to view object rows.
So, when I do
viewObject.setDoFiltering(false);
viewObject.setQueryMode(ViewObject.QUERY_MODE_SCAN_VIEW_ROWS);
viewObject.executeQuery();
It will return me those rows that were displayed previous time.
If I do
viewObject.setDoFiltering(true);
viewObject.setQueryMode(ViewObject.QUERY_MODE_SCAN_DATABASE_TABLES);
viewObject.executeQuery();
It will return me all rows, but I will lost my changes already made to view object rows.
My questions is how to avoid it? Maybe there is another way of doing this? Maybe it is possible to do something with RichTable to tell it how to filter rows in memory.
Any advices are warmly appricated!
I believe this can be done using ViewCriteria, to filter means to apply a ViewCriteria, and then disable it to view all your data