GithubHelp home page GithubHelp logo

contributte / datagrid Goto Github PK

View Code? Open in Web Editor NEW
284.0 24.0 190.0 6.47 MB

:muscle: DataGrid for Nette Framework: filtering, sorting, pagination, tree view, table view, translator, etc

Home Page: https://contributte.org/packages/contributte/datagrid/

License: MIT License

PHP 76.19% CSS 3.82% JavaScript 0.22% Latte 7.66% Makefile 0.19% TypeScript 11.91%
contributte datagrid nette-framework doctrine nette-database dibi nextras-orm nette

datagrid's Introduction

Website 🚀 contributte.org | Contact 👨🏻‍💻 paveljanda.com, f3l1x.io | Twitter 🐦 @contributte

Usage

To install latest version of contributte/datagrid use Composer.

composer require ublaboo/datagrid

Documentation

For details on how to use this package, check out our documentation.

Shortly

You are looking at first class datagrid for Nette Framework. Supported features: filtering, sorting, pagination, tree view, table view, translator and many others. Give us a star, it makes us so happy. Thanks ⭐.️

What Where
Documentation contributte.org/packages/contributte/datagrid/
Demo https://examples.contributte.org/datagrid-skeleton/
Example project github.com/contributte/playground/tree/master/contributte-datagrid
Forum (EN) will be updated
Forum (CZ) forum.nette.org/cs/25444

Versions

State Version Branch Nette PHP
dev ^7.0.0 master 3.0+ >=8.0
stable ^6.7.0 master 3.0+ >=7.2
stable ^6.6.0 master 3.0+ >=7.2
stable ^5.7.1 v5.x 2.3 ^5.6
stable ^4.4.22 v5.x 2.3 ^5.6
stable ^3.3.1 v5.x 2.3 ^5.3

Development

See how to contribute to this package. This package is currently maintained by these authors.

Future development

  1. At the moment, we have limited time to maintain contributte datagrid for free. But you can create some maintenance time by sponsoring us. Ask us in email for available tarifs (email visible on https://github.com/paveljanda). At the moment, we have 1 little sponsor that gives us 1 hour of maintenance per month.

  2. Sometimes, when there is a new issue opened (either with a new feature request or a bug report), we may assign a label with a dollar sign ($) and an amount of dollars to the issue. This is an opportunity for you to support datagrid vendor creators and resolve particular issue.


Consider to support contributte development team. Also thank you for using this package.

datagrid's People

Contributors

apincik avatar bigohenry avatar chapcz avatar dakorpar avatar dg avatar elring avatar f3l1x avatar harmim avatar hlavacz avatar jakubvojacek avatar jaroslavlibal avatar juniwalk avatar martenb avatar martinknor avatar martinszollos2016 avatar milsorm avatar n3t avatar paveljanda avatar pavelkovar avatar peldax avatar petrparolek avatar pitr82 avatar radekdostal avatar radekprokes avatar radimvaculik avatar rikap avatar rixafy avatar romanmatyus avatar rozsival avatar vitkutny avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

datagrid's Issues

Example of handleSort()

Does have somebody example of processing sorting? I can't get over it. I know it is not any issue, but I don't know how to right process it in database.

AJAX: Send only datagrid snippets

In my project, I have $this->redrawControl() in startup in BasePresenter. As I want to redraw all snippets by default (and change this in render methods if needed).

However this breaks datagrid filtering, because in response I also get parent snippet, which redraws whole content (with grid).

I propose adding $this->getPresenter()->redrawControl(NULL, FALSE) here, which solves whole problem.

I'm not sure if this is BC break, but it could be avoided by adding onlyRedrawGrid option or something.

Also, onReload event would do the job (where I would call redrawControl(NULL, FALSE) myself).

I'm migrating from o5/grido, where on grid manipulation (filtering, paginating, ..) only grid snippets are returned no matter what I choose to redraw.

DataGrid: Implement rendering via subcomponents

It would be great if we had the ability to do partial rendering, for example:

{control grid}

vs

<div class="panel panel-default">
    <div class="panel-body">
         {control grid:table}
    </div>
    <div class="panel-footer">
        {control grid:paginator}
        {control grid:perpage}
    </div>
</div>

Toggle detail blok

Každý riadok môže mať svoj detail renderer.

Po definovaní bloku šablóny detail sa zobrazí pre každý riadok button detail.

Po kliknutí na tlačidlo sa načíta snippet s vykreslenou šablónou - samostatný riadok pod riadkom na ktorý bolo kliknuté.

Využitie

Mám zoznam faktúr. Všetky potrebné informácie sa mi do gridu nezmestia. Štandardne musím vytvoriť samostatnú stránku s náhľadom faktúry, presenter atď.

S touto úpravou definujem iba časť šablóny s detailom priamo do gridu.

Inšpirácia - detaily platieb v internetovom bankovníctve mBank.
grid

Tree-view: Informácie o poradí sú nedostatočné

Jedno úrovňový zoznam

Odosielané informácie sú zbytočne príliš rozsiahle.

Metódou drag&drop sa vždy presúva presne jedna položka. Z toho dôvodu stačí odoslať primárny kľúč presúvanej položky a primárny kľúč položky pred ňou, nie je nutné odosielať poradie celého zoznamu.

Tree-view

V prípade tree-view sú informácie o presune položiek nedostatočné. Nezohľadňujú zanorenie.

Ako z toho von

Ideálne si predstavujem odosielať ako parametere:

  • sort-id: Primárny kľúč presúvanej položky. Odosiela sa vždy.
  • sort-parent: Primárny kľúč rodiča. Odosiela sa ak je položka zanorená v strome na inej ako prvej úrovni.
  • sort-before: Primárny kľúč predchádzajúcej položky. Odosiela sa vždy ak nie je položka prvou v danej vetve.

Takto by bolo možné na strane servera upraviť poradie podla potreby s minimálnym množstvom prenášaných informácií, ale s dostatočnými informáciami pre určenie presnej polohy.

JS: Stromový výpis

1, Nějaká vtipná/skoro zanedbatelná animace načtení potomků a skrytí
2, Animace "caretu", který bude v tlačítku "načíst potomky"
3, Samotné pře-načítání rodiče, ještě doplním
4, Ještě doplním

Rozsiahlejšie možnosti vlastného renderu

Aktuálne je možné definovať vlastný render iba pre obsah bunky v štandardnom stave.

{define col-id}
    :)
{/define}

Bolo by fajn rozšíriť možnosti o:

  • col-<id>-inline - šablóna inline editácie
  • col-<id>-header - hlavička

3-stavový multisort

Každý stĺpec je po prvom kliknutí zoradený ASC, po druhom DESC a po treťom sa nezoraďuje.

Kliknutím na 1+N stĺpec sa nastavuje poradie zoradenia.

JS: auto-submit

Prvky (inputy) jako změna počtu položek na stránku, filtrování apod by se měly při změně autosubmitnout textové inputy filtrů s nějakým zpožděním - klasika.

Pridávanie nových záznamov

Inline pridávanie nových záznamov.

Použitie formulára z inline editácie v hlavičke/päte po kliknutí na pridanie záznamu + callback na uloženie.

Filter range

Je nejak možné filtrovať čísla/dátumy od-do, podobne ako cez TwiGrid?

How to add variable to template file?

Hi,
I want to add some variable to template file. It should be used here:

{extends $original_template} {define col-age} {$item} {$myOwnVariable} {/define}

Please, how to do it?
Maybe, it's beginners issue... sorry.

Thnx
Pavel

setDataSource() doesn't take array as argument

Hi there,
i tried:

public function createComponentSimpleGrid($name)
{
    $grid = new DataGrid($this, $name);
    $data = array("id"=> 1);
    $grid->setDataSource($data);
    $grid->addColumnText("id", "id");

}

but I am getting:

Argument 1 passed to Ublaboo\DataGrid\DataModel::__construct() must be an instance of Ublaboo\DataGrid\DataSource\IDataSource, instance of Ublaboo\DataGrid\DataSource\ArrayDataSource given

when i use this

$data_arr = array(
            0 => array(
                'id' => 5,
                'name' => 'Peter'
            ),
            1 => array(
                'id' => 5,
                'name' => 'John'
            ),
            2 => array(
                'id' => 5,
                'name' => 'Vern'
            )
        );

        $source = new ArrayDataSource($data_arr); //limitation for array

        $grid = new DataGrid($this, $name);

        $grid->setDataSource($source);
        $grid->addColumnText("id", "id");

I am getting

DataGrid can not take [Ublaboo\DataGrid\DataSource\ArrayDataSource] as data source. search► 

DoctrineDataSource: Loading entities as array

So I found the problem we were talking about in #40,
you are getting doctrine data as an array which is wrong, entities aren't just packages of data, there are methods that supplement the data and those methods are needed.

I think DoctrineDataSource should be changed to return list of entities (objects) and for reading data, you should consider symfony/property-access.

Dibi fluent mssql data source

Předělat filtrovani date (date-range):

$this->data_source->where(
    'CONVERT(varchar(10), %n, 112) >= ?',
    $column,
    date('Ymd', $date_timestamp_from)
);

tfoot block

Bolo by možné pridať blok tfoot?

V rendereri stĺpcov by tak bolo možné nastaviť čiastkové výpočty a v päte vypísať sumár hodnôt a pod.

Vďaka!

Demo/Items per page: Error 500

When I choose All results per page on demo, server responds with error 500.

While I understand why this happens, it probably shouldn't on demo (It looks like it doesn't work, without any feedback to user).

Also, All is not translated, Vše is shown instead.

Skrývanie/zobrazovanie stĺpcov

Use case:
Mám obrovské množstvo parametrov - potenciálne veľké množstvo stĺpcov. Každého klienta môžu zaujímať iné.
Grid obsahuje nastavenia a filtre pre všetky. V nastavení gridu je zoznam predvolene zobrazených stĺpcov.
Grid obsahuje komponentu (napr. checkbox dropdown list) so zoznamom všetkých definovaných stĺpcov.
Po označení/zrušení ktoréhokoľvek sa grid prekreslí podla nového nastavenia.
Poradie stĺpcov sa dá meniť - drag&drop.
Nastavenie sa ukladá do session.

Ak by som na toto poslal PR, bol by prijatý?

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.