Skip to content

Commit

Permalink
fix: initial "selected-changed" event is not fired
Browse files Browse the repository at this point in the history
This was the behaviour in Polymer and there is code that relies on it.
  • Loading branch information
cristinecula committed Sep 30, 2020
1 parent 17a888a commit 5e7086a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/use-tabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ const useTabSelectedEffect = (host, selectedTab) => {

useTabSelectedEffect(host, selectedTab);

useEffect(() => {
notifyProperty(host, 'selected', selection);
}, []);

useEffect(() => {
const onTabAlter = e => {
e.stopPropagation();
Expand Down

0 comments on commit 5e7086a

Please sign in to comment.