public inbox for [email protected]  
help / color / mirror / Atom feed
From: Rahul Shirsat <[email protected]>
To: Nikhil Mohite <[email protected]>
Cc: pgadmin-hackers <[email protected]>
Cc: Akshay Joshi <[email protected]>
Subject: Re: [pgAdmin] RM6098 Manually deleting from table view hangs
Date: Tue, 19 Jan 2021 20:52:55 +0530
Message-ID: <CAKtn9dOBt2js4TTdb7MiwEVv4WcU0AprZtQLbpOFq_GVvtPh8A@mail.gmail.com> (raw)
In-Reply-To: <CAOBg0AO3nFBVrSwujuxoF38heF7Uvd2wARsuOhuno6nBwpv1gQ@mail.gmail.com>
References: <CAKtn9dNkLaiMxAn05=HNJZ3w4LgcC9iLh3yZvwDTE3yLVCXgaw@mail.gmail.com>
	<CANxoLDete8BU4ThRCXV_K6kjm6hqa4u1dixXfMTBOWcUea0zEQ@mail.gmail.com>
	<CAOBg0AO3nFBVrSwujuxoF38heF7Uvd2wARsuOhuno6nBwpv1gQ@mail.gmail.com>

Fixed the above observation. Removed unnecessary code for calling slickgrid
delete API.

On Tue, Jan 19, 2021 at 3:30 PM Nikhil Mohite <
[email protected]> wrote:

> Hi Rahul,
>
> While reviewing the patch, found one observation with deleted records.
> 1. Selected multiple records and click on delete records.
> [image: Screenshot 2021-01-19 at 3.05.55 PM.png]
> 2. Now unselect or unmark any record. (click on index column cell to
> unselect the row)
> [image: Screenshot 2021-01-19 at 3.06.04 PM.png]
> 3. Click on the Save data changes button.
> 4. All selected records get deleted but the unselected records remain in
> the grid.
> [image: Screenshot 2021-01-19 at 3.06.13 PM.png]
> 5.  After re-executing the filter query that record gets removed from the
> grid.
>
> Regards,
> Nikhil Mohite.
>
>
>
> On Tue, Jan 19, 2021 at 1:41 PM Akshay Joshi <
> [email protected]> wrote:
>
>> Hi Nikhil
>>
>> Can you please review it.
>>
>> On Mon, Jan 18, 2021 at 8:21 PM Rahul Shirsat <
>> [email protected]> wrote:
>>
>>> Hi Hackers,
>>>
>>> Please find the attached patch which resolves the issue of deleting
>>> records when the user tries to delete multiple records step by step.
>>>
>>> --
>>> *Rahul Shirsat*
>>> Senior Software Engineer | EnterpriseDB Corporation.
>>>
>>
>>
>> --
>> *Thanks & Regards*
>> *Akshay Joshi*
>> *pgAdmin Hacker | Principal Software Architect*
>> *EDB Postgres <http://edbpostgres.com>*
>>
>> *Mobile: +91 976-788-8246*
>>
>

-- 
*Rahul Shirsat*
Senior Software Engineer | EnterpriseDB Corporation.


Attachments:

  [image/png] Screenshot 2021-01-19 at 3.05.55 PM.png (118.6K, 3-Screenshot%202021-01-19%20at%203.05.55%20PM.png)
  download | view image

  [image/png] Screenshot 2021-01-19 at 3.06.04 PM.png (119.9K, 4-Screenshot%202021-01-19%20at%203.06.04%20PM.png)
  download | view image

  [image/png] Screenshot 2021-01-19 at 3.06.13 PM.png (119.0K, 5-Screenshot%202021-01-19%20at%203.06.13%20PM.png)
  download | view image

  [application/octet-stream] RM6098_v2.patch (703B, 6-RM6098_v2.patch)
  download | inline diff:
diff --git a/web/pgadmin/tools/sqleditor/static/js/sqleditor.js b/web/pgadmin/tools/sqleditor/static/js/sqleditor.js
index 05deebc41..b374a53b0 100644
--- a/web/pgadmin/tools/sqleditor/static/js/sqleditor.js
+++ b/web/pgadmin/tools/sqleditor/static/js/sqleditor.js
@@ -3551,7 +3551,7 @@ define('tools.querytool', [
                 } else {
                   dataView.beginUpdate();
                   for (var j = 0; j < rows.length; j++) {
-                    var item = grid.getDataItem(rows[j]);
+                    var item = grid.getData().getItemById(rows[j]);
                     data.push(item);
                     dataView.deleteItem(item[self.client_primary_key]);
                   }


view thread (5+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: [pgAdmin] RM6098 Manually deleting from table view hangs
  In-Reply-To: <CAKtn9dOBt2js4TTdb7MiwEVv4WcU0AprZtQLbpOFq_GVvtPh8A@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox