appbaseio / reactivesearch

Search UI components for React and Vue
https://opensource.appbase.io/reactivesearch
Apache License 2.0
4.89k stars 468 forks source link

componentId is required if used in slot #2120

Closed indykoning closed 1 year ago

indykoning commented 1 year ago

Affected Projects

Vue.JS Library Version: x.y.z

1.33.0-vue Describe the bug

In PreferencesConsumer the check on componentId prevents usage of vue components in outside slots https://github.com/appbaseio/reactivesearch/blob/3876244ea0505e5870840e589b31e6528a973b03/packages/vue/src/components/basic/PreferencesConsumer.jsx#L17

Since html forces lowercase whenever you add componentId the prop componentId will never exist. In Vue itself a solution for this is to use component-id which has always worked on these components before.

However this check does not check component-id or componentId causing the error "ReactiveSearch: componentId is required'" whenever a reactivesearch component is used within plain html. To Reproduce

Steps to reproduce the behavior: Add the reactivelist component with component-id="example" in a plain html file which vue is initialised on

Expected behavior

I expect the usage of component-id to still work.

Screenshots

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context

bietkul commented 1 year ago

@indykoning Thanks for reporting the issue, a release (v1.33.1) is out with fix.