bhaveshpatel200 / vue3-datatable

vue3-datatable is a powerful component for creating dynamic and customizable data tables. It supports large amounts of data, sorting, pagination, and filtering and highly customizable
MIT License
123 stars 18 forks source link

Add property and functions #11

Closed te-deum closed 11 months ago

te-deum commented 11 months ago

Message pour Pull Request : Hello,

I am using your plugin. It work great but for my project I need some other functionnality. So I added them. They are :

Here is an example of columnFilterLang translation :

{
    'contain': 'Contiens',
    'end_with': 'Termine par',
    'equal': 'Egale',
    'greater_than': 'Supérieur à',
    'greater_than_equal': 'Sup. ou égale à',
    'is_null': 'Est null',
    'less_than': 'Inférieur à',
    'less_than_equal': 'Inf. ou égale à',
    'no_filter': 'Aucun',
    'not_contain': 'Ne contiens pas',
    'not_equal': 'Différent',
    'is_not_null': 'Non null',
    'start_with': 'Commence par',
}
bhaveshpatel200 commented 11 months ago

Thanks, I will check on this weekend and if any changes will let you know.

I think am not agree to add saveState and LoadState functions, because you can manage this outside table package easily. same code you can write in your page and used to maintain all variables like filters, search etc read from local storage and assign. I have already did this type state management in aggrid from outside of aggrid datatable.

te-deum commented 11 months ago

Hello,

I agree that it's possible to save and load state outside but not all infos are available or up to date outside (like page number, page size, sorting column and order for example). Or I may not know how to get these informations outside the plugin (If you have advise to get these infos outside).

The main purpose is to offer the possibility to save and load state out of the box without "effort".

bhaveshpatel200 commented 11 months ago

image

we have events which are the triggers when changed page, pagesize, sorting etc, so you can manage all your variables updated based on this events.

and we can add one more method to get all params like you want to save on localstorage and can easily get all at one place.

te-deum commented 11 months ago

Hello,

When do you think you'll have time to check this pull request? I would like to integrate these changes to my project.

Thank you.

bhaveshpatel200 commented 11 months ago

Hi, Sorry for delay because i was away.

I have checked your codes and seems found issue, so will give you updates. so please not create new pull request for now.

bhaveshpatel200 commented 11 months ago

Hi,

You can closed this pull request. I have uploaded your above changes (new props and getFilteredRows method) in new version.

te-deum commented 11 months ago

Thank you.