File tree Expand file tree Collapse file tree
frontend/src/components/pages/topics Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -152,13 +152,21 @@ export const TopicConsumers: FC<TopicConsumersProps> = ({ topic }) => {
152152 ) ) }
153153 </ TableHeader >
154154 < TableBody >
155- { table . getRowModel ( ) . rows . map ( ( row ) => (
156- < TableRow key = { row . id } >
157- { row . getVisibleCells ( ) . map ( ( cell ) => (
158- < TableCell key = { cell . id } > { flexRender ( cell . column . columnDef . cell , cell . getContext ( ) ) } </ TableCell >
159- ) ) }
155+ { table . getRowModel ( ) . rows . length === 0 ? (
156+ < TableRow >
157+ < TableCell className = "text-center" colSpan = { columns . length } >
158+ No data found
159+ </ TableCell >
160160 </ TableRow >
161- ) ) }
161+ ) : (
162+ table . getRowModel ( ) . rows . map ( ( row ) => (
163+ < TableRow key = { row . id } >
164+ { row . getVisibleCells ( ) . map ( ( cell ) => (
165+ < TableCell key = { cell . id } > { flexRender ( cell . column . columnDef . cell , cell . getContext ( ) ) } </ TableCell >
166+ ) ) }
167+ </ TableRow >
168+ ) )
169+ ) }
162170 </ TableBody >
163171 </ Table >
164172 < DataTablePagination table = { table } />
Original file line number Diff line number Diff line change @@ -188,13 +188,21 @@ export const TopicPartitions: FC<TopicPartitionsProps> = ({ topic }) => {
188188 ) ) }
189189 </ TableHeader >
190190 < TableBody >
191- { table . getRowModel ( ) . rows . map ( ( row ) => (
192- < TableRow key = { row . id } >
193- { row . getVisibleCells ( ) . map ( ( cell ) => (
194- < TableCell key = { cell . id } > { flexRender ( cell . column . columnDef . cell , cell . getContext ( ) ) } </ TableCell >
195- ) ) }
191+ { table . getRowModel ( ) . rows . length === 0 ? (
192+ < TableRow >
193+ < TableCell className = "text-center" colSpan = { columns . length } >
194+ No data found
195+ </ TableCell >
196196 </ TableRow >
197- ) ) }
197+ ) : (
198+ table . getRowModel ( ) . rows . map ( ( row ) => (
199+ < TableRow key = { row . id } >
200+ { row . getVisibleCells ( ) . map ( ( cell ) => (
201+ < TableCell key = { cell . id } > { flexRender ( cell . column . columnDef . cell , cell . getContext ( ) ) } </ TableCell >
202+ ) ) }
203+ </ TableRow >
204+ ) )
205+ ) }
198206 </ TableBody >
199207 </ Table >
200208 < DataTablePagination table = { table } />
You can’t perform that action at this time.
0 commit comments