public inbox for [email protected]
help / color / mirror / Atom feedFrom: Surinder Kumar <[email protected]>
To: Dave Page <[email protected]>
Cc: pgadmin-hackers <[email protected]>
Subject: Re: [pgAdmin4][Patch]: Select2 control destroy issue [Minor fix]
Date: Fri, 21 Oct 2016 20:25:29 +0530
Message-ID: <CAM5-9D-081KaqiSCrtup4Xnf=8rrK+B7tsd0ehCs8r_Kg9ukRA@mail.gmail.com> (raw)
In-Reply-To: <CA+OCxoy7UoDxC+4-__fyuDs7efaqj480V+Gnkz_E6RSD57s+MA@mail.gmail.com>
References: <CAM5-9D9CkiQ10Tdann6cA_LDmDcuiZLcNRtWvka0fLt5h3izcA@mail.gmail.com>
<CA+OCxoy7UoDxC+4-__fyuDs7efaqj480V+Gnkz_E6RSD57s+MA@mail.gmail.com>
List-Unsubscribe: <mailto:[email protected]?body=unsub%20pgadmin-hackers>
I missed to add the check "destroy only if select2 has destroy property'.
in previous patch.
It was reproducible when I select access method of exclusion constraint
from combo box.
Please find attached patch and review.
On Sat, Oct 15, 2016 at 12:50 AM, Dave Page <[email protected]> wrote:
> Thanks, applied.
>
>
> On Friday, October 14, 2016, Surinder Kumar <surinder.kumar@enterprisedb.
> com> wrote:
>
>> Hi
>>
>> While clicking on Select2 control, it tries to destroy the control and
>> thus it doesn't get this object sometimes and throws error.
>>
>> It should attempt to destroy the select2 object only if this object is
>> not undefined.
>> Adds proper check to handle the case.
>>
>> Please find minor patch and review.
>>
>> Thanks
>> Surinder Kumar
>>
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>
>
--
Sent via pgadmin-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers
Attachments:
[application/octet-stream] select2_control_destroy_issue_v2.patch (497B, 3-select2_control_destroy_issue_v2.patch)
download | inline diff:
diff --git a/web/pgadmin/static/js/backform.pgadmin.js b/web/pgadmin/static/js/backform.pgadmin.js
index 60a5c78..8d2d280 100644
--- a/web/pgadmin/static/js/backform.pgadmin.js
+++ b/web/pgadmin/static/js/backform.pgadmin.js
@@ -1894,7 +1894,8 @@
].join("\n")),
render: function() {
- if(this && this.$sel && this.$sel.select2) {
+ if(this.$sel && this.$sel.select2 &&
+ this.$sel.select2.hasOwnProperty('destroy')) {
this.$sel.select2('destroy');
}
view thread (4+ 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]
Subject: Re: [pgAdmin4][Patch]: Select2 control destroy issue [Minor fix]
In-Reply-To: <CAM5-9D-081KaqiSCrtup4Xnf=8rrK+B7tsd0ehCs8r_Kg9ukRA@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