enterprise-wc icon indicating copy to clipboard operation
enterprise-wc copied to clipboard

IdsPager: Unable to 'enable' pager-button when not using 'total' and 'page-number' attributes

Open pwpatton opened this issue 1 year ago • 2 comments

Describe the bug In landmark we don't know the number of record or what page we are on. When not using 'total' and 'page-number' attributes the ids-pager-button's never get enabled.

To Reproduce

Steps to reproduce the behavior:

  1. Go to https://main.wc.design.infor.com/ids-pager/example.html
  2. Open developer tools
  3. In console type "$('[first]').disabled = false"
  4. Notice the button does not get enabled

If you break in ids-pager-button #updateDisabledState you'll see that this.hasAttribute('nav-disabled') return true causing the button to be disabled.

Expected behavior When not using total, page-number settings don't consider 'nav-disabled' functionality.

Version latest web component

Screenshots image

image

Platform

  • Infor Application/Team Name: Landmark
  • OS Version: windows 11
  • Browser Name: chrome
  • Browser Version: latest

pwpatton avatar Oct 02 '23 15:10 pwpatton

https://main-enterprise.demo.design.infor.com/components/datagrid/example-paging-indeterminate.html

tmcconechy avatar Nov 02 '23 15:11 tmcconechy

<ids-pager>
   <ids-pager-button first></ids-pager-button>
  <ids-pager-button previous></ids-pager-button>
  <ids-pager-button next></ids-pager-button>
  <ids-pager-button last></ids-pager-button>
</ids-pager>

Markup like this + a small page size selector. No total and should be able to fire events and set states. EP Example https://main-enterprise.demo.design.infor.com/components/datagrid/example-paging-indeterminate.html

tmcconechy avatar Nov 02 '23 15:11 tmcconechy