File tree Expand file tree Collapse file tree 3 files changed +23
-3
lines changed
Expand file tree Collapse file tree 3 files changed +23
-3
lines changed Original file line number Diff line number Diff line change 1+ bower_components /
2+ node_modules /
Original file line number Diff line number Diff line change 2121 "iron-flex-layout" : " PolymerElements/iron-flex-layout#^2.0.0" ,
2222 "paper-icon-button" : " PolymerElements/paper-icon-button#^2.0.1" ,
2323 "paper-input" : " PolymerElements/paper-input#^2.0.2" ,
24- "iron-icons" : " PolymerElements/iron-icons#^2.0.1"
24+ "iron-icons" : " PolymerElements/iron-icons#^2.0.1" ,
25+ "juicy-select" : " ^1.1.3"
2526 },
2627 "devDependencies" : {
2728 "iron-demo-helpers" : " PolymerElements/iron-demo-helpers#^2.0.0" ,
Original file line number Diff line number Diff line change 44< link rel ="import " href ="../paper-icon-button/paper-icon-button.html ">
55< link rel ="import " href ="../paper-input/paper-input.html ">
66< link rel ="import " href ="../iron-flex-layout/iron-flex-layout.html ">
7+ < link rel ="import " href ="../juicy-select/juicy-select.html ">
78
89<!--
910 `pagination-input` is a simple pagination control with an paper-input.
6667 }
6768 </ style >
6869
70+ < juicy-select value ="{{pageSize}} " options ="[[pageSizes]] " text-property ="Name " value-property ="Value " selected-property ="Selected ">
71+ </ juicy-select >
6972 < paper-icon-button icon ="icons:first-page " on-click ="_onFirstPageBtnClick " disabled$ ="[[_shouldDisablePreviousPageBtns(currentPage)]] "> </ paper-icon-button >
7073 < paper-icon-button icon ="icons:chevron-left " on-click ="_onPreviousPageBtnClick " disabled$ ="[[_shouldDisablePreviousPageBtns(currentPage)]] "> </ paper-icon-button >
7174 < paper-input id ="input " type ="number " on-change ="_onInputValueChange " no-label-float ="true " min ="1 " max$ ="[[pageCount]] " auto-validate allowed-pattern ="[0-9] ">
9396 /**
9497 * Number of pages
9598 */
96- pageCount : Number
99+ pageCount : Number ,
100+ pageSize : {
101+ type : Number ,
102+ notify : true
103+ } ,
104+ pageSizes : {
105+ type : Array
106+ } ,
97107 }
98108 }
99109
100110 static get observers ( ) {
101111 return [
102112 "_onPageCountChange(pageCount)" ,
103- "_onCurrentPageChange(currentPage)"
113+ "_onCurrentPageChange(currentPage)" ,
114+ "_onSizeChange(pageSize)" ,
104115 ] ;
105116 }
106117
118+ _onSizeChange ( e ) {
119+ if ( e ) {
120+ this . dispatchEvent ( new CustomEvent ( 'sizeChange' , { detail : { size : e } } ) ) ;
121+ }
122+ }
123+
107124 _shouldDisablePreviousPageBtns ( currentPage ) {
108125 return currentPage === 1 ;
109126 }
You can’t perform that action at this time.
0 commit comments