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 {
325325 const optionIconIos =
326326 theme === 'ios' && ( optionData . optionIconIos || ss . params . optionIconIos ) ;
327327 const optionIconMd = theme === 'md' && ( optionData . optionIconMd || ss . params . optionIconMd ) ;
328+ const optionInputIconPosition =
329+ optionData . inputIconPosition || ss . params . inputIconPosition || '' ;
328330
329331 const optionHasMedia = optionImage || optionIcon || optionIconIos || optionIconMd ;
330332 const optionColor = optionData . optionColor ;
@@ -353,6 +355,7 @@ class SmartSelect extends Framework7Class {
353355 icon : optionIcon ,
354356 iconIos : optionIconIos ,
355357 iconMd : optionIconMd ,
358+ inputIconPosition : optionInputIconPosition ,
356359 color : optionColor ,
357360 className : optionClassName ,
358361 disabled : $optionEl [ 0 ] . disabled ,
@@ -432,7 +435,11 @@ class SmartSelect extends Framework7Class {
432435
433436 itemHtml = (
434437 < 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+ >
436443 < input
437444 type = { item . inputType }
438445 name = { item . inputName }
Original file line number Diff line number Diff line change @@ -93,6 +93,8 @@ export namespace SmartSelect {
9393 optionIconIos ?: string ;
9494 /** Same as `optionIcon` but will apply only when MD theme is active */
9595 optionIconMd ?: string ;
96+ /** Specify checkbox/radio icon position, can be 'start' or 'end' (default 'start') */
97+ inputIconPosition ?: string ;
9698
9799 /** Function to render smart select page, must return full page HTML string */
98100 renderPage ?: ( items : any [ ] ) => string ;
Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ export default {
3636 navbarColorTheme : undefined ,
3737 routableModals : false ,
3838 url : 'select/' ,
39+ inputIconPosition : 'start' ,
3940 cssClass : '' ,
4041 /*
4142 Custom render functions
You can’t perform that action at this time.
0 commit comments