hjalmers / angular-generic-table

A generic table for Angular 2+. Generic table uses standard markup for tables ie. table, tr and td elements etc. and has support for expanding rows, global search, filters, sorting, pagination, export to CSV, column clicks, custom column rendering, custom export values.
https://hjalmers.github.io/angular-generic-table/
MIT License
104 stars 55 forks source link

Custom inlineEdit #255

Open mayraGL opened 6 years ago

mayraGL commented 6 years ago

Hi @hjalmers

I would like to know if the component that is used in the editing of the cell can be customized in some way, for example, add a directive or make its size the width of the column.

I have the following table and I would like that the user could only enter numbers in the editable field (directive) and that if you click anywhere in the cell you can edit the content and not have to go to where the text is

image

hjalmers commented 6 years ago

@mayraGL if you're talking about the inline editing component you can read more about how to configure it here, currently it's pretty basic but you could set the type to number to only allow numbers to be entered. It also uses full width and the input borders are hidden too but you could customize the appearance with pure css (it's basically just an input field in a table cell) if you like.

The other option would be to use a custom component like in this example and then you can do pretty much what ever you want:)