38 Commits

Author SHA1 Message Date
1cf1eca002 fix(tab-button): update event type interface on React (#27950)
closes #27949

---------

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

- Typescript is complaining about the `onClick` event type of the
`IonTabButton`

```ts
const App: React.FC = () => {
  async function handleTabClick(e: CustomEvent<HTMLIonTabButtonElement>) {
    alert(e.detail.tab);
  }

  return (
    <IonTabButton tab="myTab" onClick={handleTabClick}>
  );
};
```

## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- `onClick` handler uses `CustomEvent` type
- Typescript does not error

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!-- If this introduces a breaking change, please describe the impact
and migration path for existing applications below. -->




## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->
2023-08-09 14:05:39 +00:00
beb46bf9de fix(react): nav will remove components from the DOM (#25763)
Issue #: resolves #25753

----------

<!-- Please refer to our contributing documentation for any questions on
submitting a pull request, or let us know here if you need any help:
https://ionicframework.com/docs/building/contributing -->

## Pull request checklist

Please check if your PR fulfills the following requirements:
- [x] Tests for the changes have been added (for bug fixes / features)
- [ ] Docs have been reviewed and added / updated if needed (for bug
fixes / features)
- Some docs updates need to be made in the `ionic-docs` repo, in a
separate PR. See the [contributing
guide](https://github.com/ionic-team/ionic-framework/blob/main/.github/CONTRIBUTING.md#modifying-documentation)
for details.
- [x] Build (`npm run build`) was run locally and any changes were
pushed
- [x] Lint (`npm run lint`) has passed locally and any fixes were made
for failures


## Pull request type

<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->

<!-- Please try to limit your pull request to one type, submit multiple
pull requests if needed. -->

Please check the type of change your PR introduces:
- [x] Bugfix
- [ ] Feature
- [ ] Code style update (formatting, renaming)
- [ ] Refactoring (no functional changes, no api changes)
- [ ] Build related changes
- [ ] Documentation content changes
- [ ] Other (please describe): 


## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

When `IonNav` performs a pop operation (navigating to root, back, etc.)
the views are not removed from the DOM.

<!-- Issues are required for both bug fixes and features. -->


## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->

- `IonNav` removes pages from the DOM when they are popped (navigate
back, navigate to root, etc.)
- Memoized constructing React delegate (was reconstructing on each
render)

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

<!-- If this introduces a breaking change, please describe the impact
and migration path for existing applications below. -->


## Other information

<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->

---------

Co-authored-by: Liam DeBeasi <liamdebeasi@users.noreply.github.com>
2023-04-19 17:03:24 +00:00
b02190d71f chore(react): migrate to eslint, add prettier (#26633) 2023-01-18 16:49:25 -05:00
c2e1ad385d chore(many): replace any types and add tech debt tickets (#26293)
Co-authored-by: Liam DeBeasi <liamdebeasi@users.noreply.github.com>
2023-01-06 09:34:55 -06:00
61e4ffe47f fix(react): IonNav apply properties to page components (#25603)
Resolves #25602
2022-07-28 16:32:06 -04:00
420f9bbebd fix(react): IonNav works with react (#25565)
Resolves #24002 

Co-authored-by: Liam DeBeasi <liamdebeasi@icloud.com>
2022-07-06 13:45:30 -04:00
6034418b33 fix(react): IonTabButton will call custom onClick handlers (#25313)
Resolves #22511
2022-05-19 12:19:34 -04:00
bdb5c421d2 fix(react-router): remove page transition flicker on outlet mounting (#24667)
Resolves #24666
2022-01-27 16:29:52 -05:00
e4056f7945 chore(): sync with main 2021-12-07 14:57:29 -05:00
8f188eaae7 fix(react): properly check for custom elements to avoid errors in unit tests (#24156)
resolves #24149
2021-12-06 17:06:17 -05:00
15fc293d75 fix(react): improve component compatibility with preact (#24132)
resolves #23516
2021-11-03 09:25:08 -04:00
c50d895370 feat(react): add custom elements bundle (#23896) 2021-09-13 14:53:28 -04:00
f2a05bed1e fix(react): add SSR check to IonTabs (#23696)
resolves #23651
2021-08-02 10:28:51 -04:00
0dd189e2c0 fix(react): callback refs now work correctly with ionic components (#23152)
resolves #23153
2021-04-22 09:56:04 -04:00
f94e618a7b fix(react): only pass tab event props from IonTabs to IonTabBar if defined (#23024)
resolves #23023
2021-03-05 16:03:14 -05:00
b064fdebef fix(react): onIonTabsWillChange and onIonTabsDidChange event handlers are now properly bound to IonTabs (#22233)
Co-authored-by: Hansu Kim <khsily@users.noreply.github.com>
2021-02-11 14:50:07 -05:00
fa515eb79b refactor(react): look up tabs also by property key (#22823)
When IonTabBar is wrapped by a functional component or fragment, then IonTabs is unable to find it. This is a rare case, but adding the ability for a function component to manually state that is is an IonTabBar. Same for IonTabButtons.
2021-02-01 11:31:33 -06:00
91aaaab71a chore(react): adding prettier and formating files 2020-12-07 09:31:33 -07:00
f58424f625 fix(react): setting active tab properly on mount, closes #21830 (#21833)
* fix(react): setting active tab properly on mount, closes #21830

* removing commented code

* merge with master
2020-07-29 12:15:34 -06:00
74468ab797 fix(reat): fix tab currentHref when changing tabs, closes #21834 (#21835) 2020-07-29 10:48:45 -06:00
bfddb17065 fix(react): using autonomous web component for safari support, closes #21803
* fix(react): using autonomous web component for safari support, closes #21803

* taking out extends
2020-07-24 12:25:28 -06:00
1351b2eafc fix(react): fix regression on IonTabsContext not working properly (#21751) 2020-07-14 13:26:04 -06:00
c171ccbd37 feat(react): React Router Enhancements (#21693) 2020-07-07 12:02:05 -05:00
43f9d24824 feat(react): Add IonTabsContext to add some missing element methods, closes #19935 (#21171) 2020-04-30 15:08:23 -06:00
102a842bd2 fix(react): IonTabBar properly extends IonicReactProps (#21009)
fixes #21006
2020-04-10 13:09:06 -04:00
45d03baf98 fix(react): update paths of tab buttons when href changes in ion buttons, fixes #20321 (#20480) 2020-02-14 13:36:30 -07:00
f971f76b4b fix(react): update icon types to be a string as well, fixes #20229 (#20230) 2020-01-23 13:10:29 -07:00
43712db1be fix(react): first render performance improvements 2019-12-11 09:30:16 -07:00
693ae21096 fix(react): support navigating to same page and route updates in IonRouterOutlet, fixes #19891, #19892, #19986 2019-12-11 09:30:15 -07:00
834666c754 fix(react): adding change events to iontabs, fixes #19665 (#19711) 2019-10-21 17:32:37 -04:00
71fdcbc1b4 fix(react): adding HashRouter to available ion routers, fixes #19621 (#19683) 2019-10-21 17:32:22 -04:00
28d21ae55f chore(react): fixing test and another method to tab nav 2019-10-14 11:13:20 -06:00
8935d4d1b6 fix(react): handle tab back nav better, fixes #19646 (#19647) 2019-10-14 11:13:20 -06:00
033abe994b fix(react): handle undefined attributes better, fixes #19563, #19580 (#19588) 2019-10-09 10:36:25 -06:00
c79e74b91f fix(react): fix types for new stencil 2019-09-25 17:05:11 -06:00
446cf78e58 chore(): update deps (#19437) 2019-09-25 18:12:57 +02:00
73dd70d756 feature(react): rc2 release
* fix(): add a page with class ion-page back to ionrouteroutlet - fixes #19146

* wip

* fix(react): attributes show up in dom

* chore(): adding ion-page to core wip

* wip

* fix destroy method

* wrap dom writes in raf

* Add comments

* fix(react): IonPage work

* chore(): ionpage rc3 changelog text

* fix(): syncing ion-page in a new way to get rid of timeout loop

* chore(): ViewStacks refactor out of router

* fix(): remove unused method in router

* wip - before setActiveView rework

* fix(): react router ion page work

* chore(): cleanup and dev release

* fix(): remove need to name tabs

* chore(): adding dev mode helpers

* fix(): adding className prop to back button fixes #19251

* fix(): routerDirection changes

* chore(): rc2 release

* fix(): fix react version in package

* chores(): build kickoff
2019-09-12 14:25:37 -06:00
930b271a4a Master react (#18998)
* chore(): bump to beta 8

* fix(): IonFabButton href fix

* fix(react): support components with href attributes

* fix(): Prep work to break router out

* fix(): breaking react-router and react-core into own packages

* chore(): moving view stuff out of react-core

* chore(): dev build 8-1

* chore(): update to react beta 8

* chore(): fixes to deps

* fix(): removing IonAnchor in favor of IonRouterLink

* chore(): beta 9 release

* refactor(react): treeshake, minify, api

* wip

* fix(): react dev builds

* fix(): fixes to get app builds working again

* fix(): removing tgz file

* feat(): adding platform helper methods

* fix(): don't map attributes to props

* chore(): add test app

* feat(): copy css folder from core

* chore(): move rollup node resolve to devDependencies

* fix(): expose setupConfig()

* perf(): improve treeshaking

* fix(): removing crypto from generateUniqueId

* fix(): adding missing rollup dp

* fix(): test cleanup and fixes to make tests pass

* chore(): moving react to packages folder

* fix(): fixing react build due to move to packages

* feat(): adding missing IonInfiniteScrollContent component

* chore(): add automated testing using cypress

* fix(): adding option onDidDismiss to controller components

* 0.0.10 react

* wip

* fix(): removing deprecated React calls

* fix(): exporting setupConfig from core

* chore(): bump to 4.8.0-rc.0

* chore(): updating test-app deps and fixing test

* chore(): updates to react readme
2019-08-13 14:24:44 -06:00