Skip to content
New issue

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

When the 'rows' property changes, Pagination component does not update #1820

Closed
mertsincan opened this issue Feb 17, 2021 · 0 comments
Closed
Assignees
Labels
Type: Bug Issue contains a defect related to a specific component.
Milestone

Comments

@mertsincan
Copy link
Member

Test code;

const TestDemo = () => {
  const [products, setProducts] = useState([]);
  const [rows, setRows] = useState(5);
  const productService = new ProductService();

  useEffect(() => {
    productService.getProductsSmall().then((data) => setProducts(data));
  }, []); // eslint-disable-line react-hooks/exhaustive-deps

  return (
    <div>
      <div className="card">
        <Button label="Test" onClick={() => setRows(10)} />
        <DataTable value={products} rows={rows} paginator>
          <Column field="code" header="Code"></Column>
          <Column field="name" header="Name"></Column>
          <Column field="category" header="Category"></Column>
          <Column field="quantity" header="Quantity"></Column>
        </DataTable>
      </div>
    </div>
  );
};
@mertsincan mertsincan added the Type: Bug Issue contains a defect related to a specific component. label Feb 17, 2021
@mertsincan mertsincan added this to the 6.1.0 milestone Feb 17, 2021
@mertsincan mertsincan self-assigned this Feb 17, 2021
@mertsincan mertsincan changed the title When the 'rows' property changes, pagination component does not update When the 'rows' property changes, Pagination component does not update Feb 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a defect related to a specific component.
Projects
None yet
Development

No branches or pull requests

1 participant