Describe the bug:
When initializing values on the paginator for the first time (when total starts at 0 to >0 value), if setting the offset property prior to setting the total property, the pageSize will not be set. This is more obvious when using frameworks like Angular where the bindings could be set in any order and developers shouldn't have to worry about the order of their bindings...
To Reproduce:
Steps to reproduce the behavior:
Create a paginator using document.createElement('forge-paginator')
Set the offset property on the new paginator instance to a value that matches the page size
Set the total property to 100
Append the paginator instance to the DOM
See that the page size hasn't changed
Expected behavior:
The offset value should be allowed to be set regardless of when total is set.
Please complete the following information:
Forge version: ^2.0.0
I have searched existing issues before creating this report? Y
Browser: All
Platform: All
OS: All
Additional context:
We may just need to check if offset is set to anything when total is set and recalculate the pageSize in the total setter as well to make sure that order doesn't matter.
Describe the bug: When initializing values on the paginator for the first time (when total starts at
0
to>0
value), if setting theoffset
property prior to setting thetotal
property, thepageSize
will not be set. This is more obvious when using frameworks like Angular where the bindings could be set in any order and developers shouldn't have to worry about the order of their bindings...To Reproduce: Steps to reproduce the behavior:
document.createElement('forge-paginator')
offset
property on the new paginator instance to a value that matches the page sizetotal
property to100
Expected behavior: The
offset
value should be allowed to be set regardless of whentotal
is set.Please complete the following information:
^2.0.0
Additional context: We may just need to check if
offset
is set to anything whentotal
is set and recalculate thepageSize
in thetotal
setter as well to make sure that order doesn't matter.