Skip to content
This repository has been archived by the owner on Dec 30, 2022. It is now read-only.

Commit

Permalink
fix(bem): make sure blockClassName is provided by component
Browse files Browse the repository at this point in the history
  • Loading branch information
rayrutjes committed Apr 7, 2017
1 parent 1fdaad2 commit 826bbc9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/vue-instantsearch-component/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ export default {
},
methods: {
bem (element, modifier) {
const blockClassName = 'ais-pagination'
if(!this.blockClassName) {
throw new Error('You need to provide \'blockClassName\' in your data.')
}

const blockClassName = this.blockClassName
if(!element) {
return this.customClassName(blockClassName)
}
Expand Down
5 changes: 5 additions & 0 deletions packages/vue-instantsearch-pagination/src/Pagination.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@
}
}
},
data () {
return {
blockClassName: 'ais-pagination'
}
},
computed: {
page () {
return this.searchStore.page
Expand Down

0 comments on commit 826bbc9

Please sign in to comment.