@emamid/svelte-data-table 1.0.6 → 1.0.7
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 +8 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
## Svelte Data Table based on [
|
|
1
|
+
## Svelte Data Table based on [Tailwind](https://tailwindcss.com/)
|
|
2
2
|
|
|
3
|
-
This data table is designed for viewing and editing data in an array of objects. It
|
|
3
|
+
This data table is designed for viewing and editing data in an array of objects. It works with Tailwind by default but any styling classes can be used via themeing. It supports custom cell editors, moving focus between cells with tab and enter, column sorting (simple and custom), conditional CSS, and more.
|
|
4
4
|
|
|
5
5
|
## Install
|
|
6
6
|
|
|
@@ -10,11 +10,15 @@ To add to an existing Svelte app, first install Tailwind if you haven't already:
|
|
|
10
10
|
> npx svelte-add@latest tailwindcss
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
Then install the
|
|
13
|
+
Then install the data table component.
|
|
14
14
|
```bash
|
|
15
|
-
> npm i
|
|
15
|
+
> npm i -D @emamid/svelte-data-table
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
+
## Note
|
|
19
|
+
|
|
20
|
+
Originally, this package used Flowbite, but I decided to reduce the number of things my package depends on. You can still use it with Flowbite, it's just not required. The primary change besides removing the Flowbite requirement is cleaning up all of the class properties and making them all work the same by using a theme data structure. Properties that used to be on the data table or part of the column config are now handled by specifying partial themes on the table or columns. I will be writing a migration guide for that but I want to get a Svelte 5 migration published right away, which the 1.x.x version is. I also need to update the documentation. I was previously using better-docs for that, but the last update was 3 years ago, so I'm looking for something else. If anyone has a suggestion to easily batch-generate docs for a Svelte component package, please drop me a line.
|
|
21
|
+
|
|
18
22
|
## Basic example
|
|
19
23
|
|
|
20
24
|
```html
|