We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
related issue: #5042
ant design pagination (react) and rc-pagination supports simple mode with total: https://pagination-react-component.vercel.app/demo/simple
add the showTotal element/node to simple node/element
let totalText = null; if (showTotal) { totalText = ( <li class={`${prefixCls}-total-text`}> {showTotal(total, [ total === 0 ? 0 : (stateCurrent - 1) * statePageSize + 1, stateCurrent * statePageSize > total ? total : stateCurrent * statePageSize, ])} </li> ); } if (simple) { if (goButton) { if (typeof goButton === 'boolean') { gotoButton = ( <button type="button" onClick={this.handleGoTO} onKeyup={this.handleGoTO}> {locale.jump_to_confirm} </button> ); } else { gotoButton = ( <span onClick={this.handleGoTO} onKeyup={this.handleGoTO}> {goButton} </span> ); } gotoButton = ( <li title={showTitle ? `${locale.jump_to}${stateCurrent}/${allPages}` : null} class={`${prefixCls}-simple-pager`} > {gotoButton} </li> ); } return ( <ul class={classNames( `${prefixCls} ${prefixCls}-simple`, { [`${prefixCls}-disabled`]: disabled }, className, )} {...restAttrs} > {totalText} <li title={showTitle ? locale.prev_page : null} onClick={this.prev} tabindex={hasPrev ? 0 : null} onKeypress={this.runIfEnterPrev} class={classNames(`${prefixCls}-prev`, { [`${prefixCls}-disabled`]: !hasPrev, })} aria-disabled={!hasPrev} > {this.renderPrev(prevPage)} </li> <li title={showTitle ? `${stateCurrent}/${allPages}` : null} class={`${prefixCls}-simple-pager`} > <BaseInput type="text" value={this.stateCurrentInputValue} disabled={disabled} onKeydown={this.handleKeyDown} onKeyup={this.handleKeyUp} onInput={this.handleKeyUp} onChange={this.handleKeyUp} size="3" ></BaseInput> <span class={`${prefixCls}-slash`}>/</span> {allPages} </li> <li title={showTitle ? locale.next_page : null} onClick={this.next} tabindex={hasNext ? 0 : null} onKeypress={this.runIfEnterNext} class={classNames(`${prefixCls}-next`, { [`${prefixCls}-disabled`]: !hasNext, })} aria-disabled={!hasNext} > {this.renderNext(nextPage)} </li> {gotoButton} </ul> ); }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
related issue: #5042
ant design pagination (react) and rc-pagination supports simple mode with total: https://pagination-react-component.vercel.app/demo/simple
What problem does this feature solve?
add the showTotal element/node to simple node/element
What does the proposed API look like?
The text was updated successfully, but these errors were encountered: