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

override beforeMount in component's lifecycle #1547

Merged
merged 2 commits into from
Sep 17, 2021

Conversation

yen-tt
Copy link
Contributor

@yen-tt yen-tt commented Sep 15, 2021

allow component to override beforeMount function by passing a beforeMountOverride function in its config. This is used to prevent component from rendering on page (e.g. for mobile map view performance).

J=SLAP-1302

  • used in theme's verticalResults config for vertical-full-page-map, and see that the provided beforeMountOverride function is called before any implementations in mount is called.

…ountOverride function in its config. This is used to prevent component from rendering on page.

J=SLAP-1302

- used in theme's verticalResults config for vertical-full-page-map, and see that the provided beforeMountOverride function is called before any implementations in mount is called.
@coveralls
Copy link

coveralls commented Sep 15, 2021

Coverage Status

Coverage increased (+0.01%) to 59.309% when pulling ccce171 on dev/custom-before-mount-cb into 4ad73c7 on develop.

@tmeyer2115 tmeyer2115 self-requested a review September 15, 2021 13:21
@yen-tt yen-tt merged commit 796a0b8 into develop Sep 17, 2021
@yen-tt yen-tt deleted the dev/custom-before-mount-cb branch September 17, 2021 20:30
@nmanu1 nmanu1 mentioned this pull request Nov 16, 2021
nmanu1 added a commit that referenced this pull request Nov 16, 2021
## Version 1.12.0
### Features
- Allow search rate tracking (#1558)
- Add support for setting and changing the visitor and passing it to answers-core (#1564)
- Add support for the auth token that is passed in from the config (#1566)
- Add an `environment` field to support consumer auth in Sandbox (#1597)
- Allow components to override the beforeMount function (#1547)
- Add distance to the card data and a function to format it (#1550)
- WCAG updates (allow pagination with Enter (#1575), identify current page in navigation tab (#1576), update autocomplete screen reader support (#1578, #1579))

### Changes
- Update directAnswers component data to include the searcher (#1596)
- Use custom alerts instead of window.alert (#1549)
- Update Mapbox version to match the Theme (#1551)
- Internal repo changes (#1562, #1577)

### Bugfixes
- Fix console error which would appear on google maps (#1548)
- Fix FAQ expansion when default is expanded (#1553)
- Fix error for searches on page load with no businessId (#1561)
cea2aj pushed a commit that referenced this pull request Apr 8, 2022
allow component to override beforeMount function by passing a beforeMountOverride function in its config. This is used to prevent component from rendering on page (e.g. [for mobile map view performance](yext/answers-hitchhiker-theme#954)).

J=SLAP-1302

- used in theme's verticalResults config for vertical-full-page-map, and see that the provided beforeMountOverride function is called before any implementations in mount is called.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants