Skip to content

Commit

Permalink
fix(table): Fix backend pagination table case (#1007)
Browse files Browse the repository at this point in the history
* feat: add BE pagination to table with pages

* test: update tests

* refactor: fix table CR notes

* lint: fix TS

* lint: fix TS

* lint: fix TS

* lint: fix TS

* lint: fix TS

* lint: update types

* lint: update types

* lint: fix TS

* lint: fix TS

* lint: fix TS

* fix: no results
  • Loading branch information
simcha90 authored and zhaoyongjie committed Nov 26, 2021
1 parent 5cb4a41 commit 716a962
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,10 @@ export default function DataTable<D extends object>({
const noResults =
typeof noResultsText === 'function' ? noResultsText(filterValue as string) : noResultsText;

const getNoResults = () => <div className="dt-no-results">{noResults}</div>;

if (!columns || columns.length === 0) {
return <div className="dt-no-results">{noResults}</div>;
return (wrapStickyTable ? wrapStickyTable(getNoResults) : getNoResults()) as JSX.Element;
}

const renderTable = () => (
Expand Down

0 comments on commit 716a962

Please sign in to comment.