react-tailwind-table 1.1.1 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -98,7 +98,7 @@ interface Iprop {
98
98
  columns: Icolumn[],
99
99
  per_page?: number,
100
100
  table_header?: string,
101
- no_content_text?: string,
101
+ no_content_text?: React.ReactNode,
102
102
  debounce_search?: number,
103
103
  show_search?: boolean,
104
104
  should_export?: boolean,
@@ -298,7 +298,13 @@ type searchCallback = (search_word: string, result?: Irow[] | []) => void
298
298
 
299
299
  ### No Content Message
300
300
 
301
- When there is no data to display (rows props is empty), the `No Data Availaible` text is shown. The `no_content_text` props controls the text.
301
+ When there is no data to display (rows props is empty), the `No Data Availaible` text is shown. The `no_content_text` prop controls what is shown. It accepts anything React can render: a string, a number, or a React element such as a component:
302
+
303
+ ```jsx
304
+ <Table columns={columns} rows={[]} no_content_text="Nothing to see here" />
305
+
306
+ <Table columns={columns} rows={[]} no_content_text={<EmptyState />} />
307
+ ```
302
308
 
303
309
 
304
310
  ### Hide Search