EasyUI Forum
April 16, 2024, 12:47:53 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Panel Close Event  (Read 4391 times)
don
Newbie
*
Posts: 28


View Profile
« on: April 28, 2022, 09:44:21 AM »

How can I add an event listener for a panel close event?  I'm using the panel's 'closable' attribute and clicking on the ".panel-tool-close" button in the header to close the panel.
Logged
jarry
Administrator
Hero Member
*****
Posts: 2260


View Profile Email
« Reply #1 on: April 29, 2022, 04:47:39 PM »

Please listen to the 'close' event. Make sure to upload to the newest version.
Code:
    <Panel title="Panel1" closable @close="onClose" style="width:800px;height:300px">
    </Panel>
Logged
don
Newbie
*
Posts: 28


View Profile
« Reply #2 on: May 02, 2022, 03:57:40 AM »

I have updated to the latest version (1.2.43) and tested exactly as suggested, but still not triggering the close event. Huh
Logged
jarry
Administrator
Hero Member
*****
Posts: 2260


View Profile Email
« Reply #3 on: May 03, 2022, 06:56:27 AM »

Please refer to this code.
Code:
<template>
  <div>
    <Panel title="Panel1" closable @close="onClose" style="width:800px;height:300px">
    </Panel>
  </div>
</template>

<script>
export default {
  methods: {
    onClose(){
      console.log('Panel closed')
    }
  }
};
</script>
Logged
don
Newbie
*
Posts: 28


View Profile
« Reply #4 on: May 03, 2022, 09:29:46 AM »

Success! As of version 1.2.44 the close event is now triggering. Thanks Jarry.  Smiley
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!