Code Monkey home page Code Monkey logo

datatable's People

Contributors

aocneanu avatar gandesc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

datatable's Issues

After composer install

php artisan vendor:publish --tag=datatable-component

[Symfony\Component\Debug\Exception\FatalThrowableError]
Class 'LaravelEnso\DataTable\DataServiceProvider' not found

I have verified the folder is in the vendor directory

How to Implement Search bar

Hi
I have implemented the data table. Also have added the meta tag "searchable" for the columns. but the search box doesn't appear. I checked the documentation and couldn't find anything related to search bar .

The following is my template.json file . Please let me know what i'm missing here so that i can enable the search bar on top on the table as shown in the examples.

{
   "routePrefix": "table",
    

    "crtNo": true,
    "cache": false,
    "flatten": false,
    "auth": false,
    "debounce": 100,
    "lengthMenu": [10, 15, 20, 25, 30],
     "selectable": false,

    "comparisonOperator": "LIKE",
       "columns": [
        {
            "label": "name",
            "data": "table.name",
            "name": "name",
            "meta": ["searchable", "sortable"]
       }
]
}
           

Fix debounce

Debounce for getData() not working correctly when we have more than one component with custom filters.

update documentation

Update documentation for newly introduced abstraction layer.

Ref #86b19f2f61f8edf3dc8c4a76b86582db9d19daba

Build a datatable based on a third party json api resquest (Feature)

Hi,

Will be very useful to allow not only pass a raw query to this package else to be able to pass a json, in order to load data from external api integration (mailchimp, github, and so on).

That will give to this package a powerful integration with the enso admin-panel.

I did a test with a rest api that I have developed. It worked, if I overwrite the method public function getTableData() on the trait use LaravelEnso\DataTable\app\Traits\DataTable;

tableController.php

public function getTableData()
    {
        $client = new Client(['base_uri' => env('API_HOST')]);

        $ApiAuthorization = ['headers' => [
            'X-Authorization'=> 'xxxxxxxx'
        ], 'http_errors' => true];

        $response = $client->request('GET', 'my-endpoint', $ApiAuthorization);
       
        // The response already contains the fields needed for the package to create the table. The 
        // response return exactly the same as the raw query does. 
        return response()->json(json_decode($response->getBody()));
    }

Something did not worked for me when I tested it passing a filter for search. I tried to return exactly what was expected but I realised I was missing something else. I have not try any further but seems like its possible to integrate it.

Regarding to search some challenges will show up for sure, since there is no sql at all. But maybe could be fixed by filtering array of collections and using transformers for formating the right json response.

Boolean feature

Mihai we need to cover this feature in the docs.

John you should update the snippet :)

Issue creating a new language

I got an exception after creating a new locale "DataTables language file is missing for $locale". This issue is affecting the datatable rendering. I can see that the file is missing on the folder "dt-lang", but the record is created on the table language.

vendor/laravel-enso/datatable/src/app/Classes/TableInit.php

Fix Render Function

the render function is called for every cell if the render array is defined.

Enable/disable extraFilters and intervalFilters

It would be nice if you can add the possibility to enable/disable extraFilters and intervalFilters.

Example:
[BUTTON: 2017]

  • if enabled, query should be "... WHERE ... AND year = 2017 ..."
  • if disabled, query should be "... WHERE ..."

Add id prop to the vue component

Now the vue component generates a dynamic id for the table based on the _uid.

This causes a problem when we use the saveState option from DT library. The DT library saves the state for each table in the browsers cookie under a generated key that uses the table id.

This results in multiple cookie entries for the same table.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.