-
Notifications
You must be signed in to change notification settings - Fork 528
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
feat(index): expose createURL #4603
Conversation
This is useful for recreating what an index widget does when it renders, see ssr in Vue, as well as poc/telemetry2 I think in the future we might want a function to retrieve the parameters given to render / init.
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 13383e4:
|
just realised the tests didn't get committed, let's add something now |
instance.init( | ||
createInitOptions({ | ||
instantSearchInstance: createInstantSearch({ | ||
// @ts-ignore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it still needed as it's called at L679?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, this function is meant to return a string, but an object is easier to assert on
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 🥇
Summary
This is useful for recreating what an index widget does when it renders, see ssr in Vue, as well as poc/telemetry2
I think in the future we might want a function to retrieve the parameters given to render / init.
Result
index exposes the scoped
createURL
function to be used in render / init / getWidgetRenderState etc.