Skip to content

Commit

Permalink
feat(searchbar): rename hideDividers -> hideGroupTitles
Browse files Browse the repository at this point in the history
  • Loading branch information
nolimits4web committed Mar 22, 2023
1 parent fb9867f commit 24e76c1
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions src/core/components/searchbar/searchbar-class.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class Searchbar extends FrameworkClass {
backdrop: true,
removeDiacritics: true,
customSearch: false,
hideDividers: true,
hideGroupTitles: true,
hideGroups: true,
disableOnBackdropClick: true,
expandable: false,
Expand Down Expand Up @@ -608,7 +608,7 @@ class Searchbar extends FrameworkClass {
}
});

if (sb.params.hideDividers) {
if (sb.params.hideGroupTitles) {
$searchContainer.find(sb.params.searchGroupTitle).each((titleEl) => {
const $titleEl = $(titleEl);
const $nextElements = $titleEl.nextAll(sb.params.searchItem);
Expand Down
4 changes: 2 additions & 2 deletions src/core/components/searchbar/searchbar.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export namespace Searchbar {
searchItem?: CSSSelector;
/** CSS selector of group element. Used when hideGroups enabled to hide groups. If we do a search in List View, then it usually a list group (default "list-group") */
searchGroup?: CSSSelector;
/** CSS selector of group titles and dividers. Used when hideDividers enabled to hide group titles and dividers. If we do a search in List View, then it usually a list group title or list item divider (default ".list-group-title") */
/** CSS selector of group titles. Used when hideGroupTitles enabled to hide group titles. If we do a search in List View, then it usually a list group title (default ".list-group-title") */
searchGroupTitle?: CSSSelector;
/** CSS selector or HTMLElement of searchbar "found" element to make it hidden when there is no search results (default ".searchbar-found") */
foundEl?: HTMLElement | CSSSelector;
Expand All @@ -44,7 +44,7 @@ export namespace Searchbar {
/** Enable to remove/replace diacritics (á, í, ó, etc.) during search (default false) */
removeDiacritics?: boolean;
/** If enabled, then search will consider item dividers and group titles and hide them if there are no found items right after them (default true) */
hideDividers?: boolean;
hideGroupTitles?: boolean;
/** If enabled, then search will consider list view groups hide them if there are no found items inside of these groups (default true) */
hideGroups?: boolean;
/** Disable searchbar on backdrop click */
Expand Down
6 changes: 3 additions & 3 deletions src/react/components/searchbar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import { Searchbar } from 'framework7/types';
ignore? : string
customSearch? : boolean
removeDiacritics? : boolean
hideDividers? : boolean
hideGroupTitles? : boolean
hideGroups? : boolean
init? : boolean
COLOR_PROPS
Expand Down Expand Up @@ -88,7 +88,7 @@ const Searchbar = forwardRef((props, ref) => {
ignore = '.searchbar-ignore',
customSearch = false,
removeDiacritics = false,
hideDividers = true,
hideGroupTitles = true,
hideGroups = true,
init = true,
} = props;
Expand Down Expand Up @@ -171,7 +171,7 @@ const Searchbar = forwardRef((props, ref) => {
ignore,
customSearch,
removeDiacritics,
hideDividers,
hideGroupTitles,
hideGroups,
expandable,
inline,
Expand Down
4 changes: 2 additions & 2 deletions src/svelte/components/searchbar.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
export let ignore = '.searchbar-ignore';
export let customSearch = false;
export let removeDiacritics = false;
export let hideDividers = true;
export let hideGroupTitles = true;
export let hideGroups = true;
export let init = true;
Expand Down Expand Up @@ -135,7 +135,7 @@
ignore,
customSearch,
removeDiacritics,
hideDividers,
hideGroupTitles,
hideGroups,
expandable,
inline,
Expand Down
4 changes: 2 additions & 2 deletions src/vue/components/searchbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export default {
type: Boolean,
default: false,
},
hideDividers: {
hideGroupTitles: {
type: Boolean,
default: true,
},
Expand Down Expand Up @@ -219,7 +219,7 @@ export default {
ignore: props.ignore,
customSearch: props.customSearch,
removeDiacritics: props.removeDiacritics,
hideDividers: props.hideDividers,
hideGroupTitles: props.hideGroupTitles,
hideGroups: props.hideGroups,
expandable: props.expandable,
inline: props.inline,
Expand Down

0 comments on commit 24e76c1

Please sign in to comment.