question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

vue3 (v4.0.0-beta.2) Customization-ready widgets issue

See original GitHub issue

Bug 🐞

What is the current behavior?

I want to customize the CSS classes of different widgets. For instance, the button ais-clear-refinements: https://www.algolia.com/doc/api-reference/widgets/clear-refinements/vue/#customize-the-ui

I replaced:

<ais-clear-refinements />

by:

<ais-clear-refinements>
  <div slot-scope="{ canRefine, refine, createURL }">
    <a
      :href="createURL()"
      @click.prevent="refine"
      v-if="canRefine"
    >
      Clear all refinements
    </a>
  </div>
</ais-clear-refinements>

But the button does not show…

I tried the same with ais-search-box https://www.algolia.com/doc/api-reference/widgets/search-box/vue/#customize-the-ui

This time the search bar was visible but not functional.

What is the expected behavior?

A visible and functional component broken down in html elements ready to be customized with custom CSS classes

What is the version you are using?

vue3 (v4.0.0-beta.2)

Always try the latest one before opening an issue.

I tried to reproduce with vue3 (v4.0.0-beta.3), but I could’nt since I the following error when starting dev server:

error when starting dev server:
Error: The following dependencies are imported but could not be resolved:

  vue-instantsearch/dist/vue3/es

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Haroenvcommented, Aug 23, 2021

in the latest beta the path is vue-instantsearch/vue3/es, not vue-instantsearch/dist/vue3/es, sorry that we don’t have docs available for betas

0reactions
Haroenvcommented, Aug 26, 2021

This is the right code: https://codesandbox.io/s/winter-pine-leezc

Note that this is unrelated to Vue InstantSearch, but rather to the examples using the older slot-scope, which is changed to v-slot https://vuejs.org/v2/guide/components-slots.html

Read more comments on GitHub >

github_iconTop Results From Across the Web

Customize a Vue InstantSearch widget - Algolia
Learn how you can customize an existing Vue InstantSearch widget.
Read more >
Vuidget — How to create an embeddable Vue.js widget with ...
1. Optimize your application as an HTML custom element · 2. Change your index.html · 3. Run the build · 4. Disable chunks...
Read more >
A curated list of awesome things related to Vue.js - GitHub
How a library can become a framework with the help of pinia and vue-router. h5 A Monorepo-based mobile engineering project. (Monorepo + Pnpm...
Read more >
Vue 3 as the New Default
Vue Test Utils for component testing; Custom JSX transforms that leverages Vue's runtime features; VuePress for Vue-based static site generation.
Read more >
The Vuetify roadmap
Overview: Rebuilt for Vue 3 using the new composition api ... Improved SASS variable customization and extensibility with Built-In Modules; New ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found