Skip to content

Commit

Permalink
feat(smart-select): add closeByBackdropClick parameter
Browse files Browse the repository at this point in the history
fixes #4107
  • Loading branch information
nolimits4web committed Dec 16, 2022
1 parent 92fd6e5 commit 66d899b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/core/components/smart-select/smart-select-class.js
Original file line number Diff line number Diff line change
Expand Up @@ -812,6 +812,7 @@ class SmartSelect extends Framework7Class {
content: popupHtml,
push: ss.params.popupPush,
swipeToClose: ss.params.popupSwipeToClose,
closeByBackdropClick: ss.params.closeByBackdropClick,
on: {
popupOpen(popup) {
ss.onOpen('popup', popup.el);
Expand Down Expand Up @@ -855,6 +856,7 @@ class SmartSelect extends Framework7Class {
closeByOutsideClick: true,
push: ss.params.sheetPush,
swipeToClose: ss.params.sheetSwipeToClose,
closeByBackdropClick: ss.params.closeByBackdropClick,
on: {
sheetOpen(sheet) {
ss.onOpen('sheet', sheet.el);
Expand Down Expand Up @@ -893,6 +895,7 @@ class SmartSelect extends Framework7Class {
const popoverParams = {
content: popoverHtml,
targetEl: ss.$el,
closeByBackdropClick: ss.params.closeByBackdropClick,
on: {
popoverOpen(popover) {
ss.onOpen('popover', popover.el);
Expand Down
3 changes: 2 additions & 1 deletion src/core/components/smart-select/smart-select.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ export namespace SmartSelect {
url?: string;
/** Additional CSS class name to be set on Smart Select container (Page, Popup, Popover or Sheet) */
cssClass?: string;

/** When enabled, Smart Select modal (Popover, Popup, Sheet) will be closed on backdrop click. (default true) */
closeByBackdropClick?: boolean;
/** Select option icon to be set on all options. If it just a string then will create an icon with this class. If it is in the format of `f7:icon_name` then it will create a F7-Icons icon. If it is in the format of `md:icon_name` then it will create a Material Icons icon. */
optionIcon?: string;
/** Same as `optionIcon` but will apply only when iOS theme is active */
Expand Down
1 change: 1 addition & 0 deletions src/core/components/smart-select/smart-select.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export default {
pageBackLinkText: 'Back',
popupCloseLinkText: 'Close',
popupTabletFullscreen: false,
closeByBackdropClick: true,
sheetCloseLinkText: 'Done',
searchbar: false,
searchbarPlaceholder: 'Search',
Expand Down

0 comments on commit 66d899b

Please sign in to comment.