I'm using antd table component.
I'm storing this table data in a state. after clicking on modify and modifying something, I'm again making an API call to get the latest data. And I'm updating the state with the latest data. But after fetching the latest data, rows are getting shuffled. If I modified the 3rd row, on re-render due to the latest data, it won't be on the 3rd row. It'll be on some other row.
Related
I have an infinite scroll located at the bottom of the page, and when scrolling to the end of the table, it will fetch and bring more data. This table contains also a search for each column:
The issue starts once the user enters a value into one of the search boxs.
That is when I filter the data and return filtered fields, but once I do that, the table has fewer rows, thus, it gets to the bottom of the page and sends a fetch call to get more data and the table is not being filtered anymore. What will be the best practice to deal with this issue?
Thanks
I have a Logic App that uses the "SQL Server - When an item is modified (V2)" trigger, monitoring an Azure SQL DB for updated rows. When running this LA, I noticed that the modified row that came as output for this trigger did NOT contain the updated data.
I thought this might be by design (don't really see why, but ok...) so I added a "Get Row" action directly after the trigger, to go fetch the most recent data for the row that triggered the LA. But even this step still returned the old, not-updated data for that row.
However, when I resubmit the run some seconds later, the "Get Row" action does get the updated data from the database.
Is this normal behavior? Is the SQL DB row version already updated even though the data update isn't committed yet, triggering the Logic App but not returning the updated data yet?
Thanks for pointing me to add a timestamp to my table, I add the timestamp and then I can find the table in the selection. I test it in my side but the trigger works fine, it output the updated data. I provide my logic below for your reference:
My table show as:
My logic app:
Please note I disable the "Split On" in "Settings" of the trigger.
After running the update sql:
update Table3 set name = 'hury1' where id = 1;
update Table3 set name = 'jim1' where id = 2;
I got the result (the variable updateItems in screenshot contains both updated items):
So I am using postgres type database and I have a function that updates rows in the database for some reason every time I change something it "pushes" the row to the end of the table rather than staying in the same position of where it was.
this is an example of me updating the data (this is a part of the function):
users.query.filter_by(username = user).update(dict(computer_id = assign_value, level=level))
db.session.commit()
but for some reason whenever I see the users table I can see that whatever value I updated is getting pushed to the end of the row
There is no such thing as an ordering on the records of a table. Internally, updating a record is handled as inserting a newer version and at some time delete the older version (if the trasaction completes, the older version should not be needed again, at least not for newer transactions). From this point of view, it even makes some sense that the record is "moved" to the end of the table (eventhough the table does not have any start or end).
If you want to have a certain ordering, consider querying the data with an appropriate ORDER BY (or whatever function or options your framework uses to do this). If you query data and you do not specify an ordering, the retrieved records may be shuffled in any way. Do never rely on things like "If I only insert in this table, the data will always be returned in the same sequence as I inserted it" (eventhough this might be true under some circumstances).
We are displaying 10,000 rows in table in the browser.
The example given in https://datatables.net/extensions/scroller/examples/initialisation/large_js_source.html shows we can show 50,000 records very quickly
We are using Angular with ng-repeat which takes 2 minutes to load the table. We have created 5 columns. In which one of the column has a condition options which will be enabled based on certain conditions for each rows. Whenever we add few options to the button it takes more time
example, edit, delete, view etc., in the action button which is part of a column
We observed whenever we add option along with the ng-repeat with the options takes huge time to render the table.
How to speed up the rendering time ??? Please advise.
Thanks.
If we receive an update statement that does not check if the value has changed in the where clause, what are the different ways to ignore that update inside a trigger?
I know we can do a comparison of each individual field (handling the ISNULL side as well), but where it's a table that has 50+ fields, is there a faster/easier way to do it?
Note:I want to save each and every event in logs for updated fields.for example i have 50 fields and one of the field is updated(for single row not for entire table),then i want to save only that updated field old value and new value in logs.
Thanks in Advance, RAHUL
If this is more about logging changes to tables, a simpler solution may be to use Change Data Capture (CDC) tables.
Every time a change is made to a table, a row is written to your CDC table. Then you could write a query over the CDC table to bring you back just the data that has changed.
More information is on CDC tables is availble here:
http://msdn.microsoft.com/en-us/library/bb522489(v=sql.105).aspx