Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] - fwChange event for fwTabs #106

Closed
samuelpares opened this issue Aug 12, 2020 · 2 comments · Fixed by #110
Closed

[Bug] - fwChange event for fwTabs #106

samuelpares opened this issue Aug 12, 2020 · 2 comments · Fixed by #110
Labels

Comments

@samuelpares
Copy link

samuelpares commented Aug 12, 2020

Component
fwTabs

Describe the bug
The fwChange event for fwTabs is being fired twice and before the tab is fully shown. So I can't get the current activeTabIndex property.

To Reproduce
Steps to reproduce the current behavior:

<body>
    <fw-tabs id="tabs">
      <fw-tab tab-header="Tab1"></fw-tab>
      <fw-tab tab-header="Tab2"></fw-tab>
    </fw-tabs>
<body>

<script>
var client;
$(document).ready(function () {
  app.initialized().then(
    function (_client) {
      client = _client;
	  $("#tabs").on("fwChange", fwTabChange);
	},
    function (error) {
      console.error(error);
    }
  );
});	  

function fwTabChange(evt) {
  console.log($("#tabs").attr("active-tab-index"));
}
<script>

Changing tabs will result in two outputs in the console with the previous tab index.

Expected behavior
Event should be fired once and after the tab is fully shown, so getting the activeTabIndex would returns the current index.

@samuelpares samuelpares added the bug Something isn't working label Aug 12, 2020
@asif-ahmed-1990 asif-ahmed-1990 self-assigned this Aug 14, 2020
asif-ahmed-1990 pushed a commit that referenced this issue Aug 14, 2020
fwChange was firing twice. This fixes and makes it fire once.

fix #106
asif-ahmed-1990 pushed a commit that referenced this issue Aug 14, 2020
fwChange was firing twice. This fixes and makes it fire once.

fix #106
github-actions bot pushed a commit that referenced this issue Aug 14, 2020
## [2.3.3](v2.3.2...v2.3.3) (2020-08-14)

### Bug Fixes

* **fw-tabs:** fwChange fires twice ([0135302](0135302)), closes [#106](#106)
@github-actions
Copy link

🎉 This issue has been resolved in version 2.3.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions
Copy link

🎉 This issue has been resolved in version 2.3.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants