File tree Expand file tree Collapse file tree 3 files changed +11
-1
lines changed
src/core/components/smart-select Expand file tree Collapse file tree 3 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -325,6 +325,8 @@ class SmartSelect extends Framework7Class {
325
325
const optionIconIos =
326
326
theme === 'ios' && ( optionData . optionIconIos || ss . params . optionIconIos ) ;
327
327
const optionIconMd = theme === 'md' && ( optionData . optionIconMd || ss . params . optionIconMd ) ;
328
+ const optionInputIconPosition =
329
+ optionData . inputIconPosition || ss . params . inputIconPosition || '' ;
328
330
329
331
const optionHasMedia = optionImage || optionIcon || optionIconIos || optionIconMd ;
330
332
const optionColor = optionData . optionColor ;
@@ -353,6 +355,7 @@ class SmartSelect extends Framework7Class {
353
355
icon : optionIcon ,
354
356
iconIos : optionIconIos ,
355
357
iconMd : optionIconMd ,
358
+ inputIconPosition : optionInputIconPosition ,
356
359
color : optionColor ,
357
360
className : optionClassName ,
358
361
disabled : $optionEl [ 0 ] . disabled ,
@@ -432,7 +435,11 @@ class SmartSelect extends Framework7Class {
432
435
433
436
itemHtml = (
434
437
< li class = { `${ item . className || '' } ${ disabled ? ' disabled' : '' } ` } >
435
- < label class = { `item-${ item . inputType } item-content` } >
438
+ < label
439
+ class = { `item-${ item . inputType } ${
440
+ item . inputIconPosition ? `item-${ item . inputType } -icon-${ item . inputIconPosition } ` : ''
441
+ } item-content`}
442
+ >
436
443
< input
437
444
type = { item . inputType }
438
445
name = { item . inputName }
Original file line number Diff line number Diff line change @@ -93,6 +93,8 @@ export namespace SmartSelect {
93
93
optionIconIos ?: string ;
94
94
/** Same as `optionIcon` but will apply only when MD theme is active */
95
95
optionIconMd ?: string ;
96
+ /** Specify checkbox/radio icon position, can be 'start' or 'end' (default 'start') */
97
+ inputIconPosition ?: string ;
96
98
97
99
/** Function to render smart select page, must return full page HTML string */
98
100
renderPage ?: ( items : any [ ] ) => string ;
Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ export default {
36
36
navbarColorTheme : undefined ,
37
37
routableModals : false ,
38
38
url : 'select/' ,
39
+ inputIconPosition : 'start' ,
39
40
cssClass : '' ,
40
41
/*
41
42
Custom render functions
You can’t perform that action at this time.
0 commit comments