aurelia-v-grid / vGrid

Aurelia-v-grid - npm source
MIT License
49 stars 10 forks source link

More custom in simple html, for menu/dragdrop #68

Closed vegarringdal closed 7 years ago

vegarringdal commented 7 years ago

@Thanood Would like you feedback here

Atm I in simple html I add the v-drag-drop, v-resizable, and v-menu by default on simple html. Was thinking I should add

That way you get more control, the simple html is mostly so people dont haveto deal with css and main markup that can be a pain. It will also make it less buggy for my code, since it was when attributes for this the bug you had issues with happend, also makes it a lot simpler to expand later

Was also thinking in the actual colConfig internally I should have a property called colCustomTemplateRow and colCustomTemplateHeader for each column, so when you get that object to save you know what template is custom html in markup, and whats generated by grid to display in grid. One nice part of keeping the template generated by the grid is that you can use simple html to generate the html for you, copy it and tweek it for a special column

vegarringdal commented 7 years ago

Gave this a little more thinking colCustomTemplateHeader & colCustomTemplateHeader wont use these, Ill keep the colHeaderTemplate and colRowTemplate Add a colHeaderTemplateGenerated and colRowTemplateGenerated for the code grid generates under simple html, also add option to not return these in getColconfig function.

vegarringdal commented 7 years ago

Will also add a colHidden / col-hidden, for setting a column as hidden by default. havent added any code for hiding columns atm, but then the interface is atleast ready for it

vegarringdal commented 7 years ago

Added most of this

Changes: col-resizeable and col-drag-drop will be enabled by default, but you can disable by setting it to attribute="false" , since having it any other way will just generate to much repeated code for user

To enable grouping you need to add title and field to the col-drag-drop, because I need to know the title to put in the grouping and what field to group.. considering just having the field as required for grouping, if it title isnt set it will use col header name