vitocmpl / ng2-ya-table Goto Github PK
View Code? Open in Web Editor NEWAngular yet another table
Home Page: https://vitocmpl.github.io/ng2-ya-table/
License: MIT License
Angular yet another table
Home Page: https://vitocmpl.github.io/ng2-ya-table/
License: MIT License
render: (data: any, row: any): string => {
return "
I have added a button i.e. editDocumentTypeId(row) in span tag. but it is not working. How it works in this datatable
Could someone add an example/demo with a simple array as the data source? This question was posted on StackOverflow months ago and is unanswered. This would make ng2-ya-table usable for a wider audience.
I've just update your module. Now if I click pagination the list disappear. Than if I change 'show entries' everything show up correctly.
I am getting following error when I am getting data dynamically from another component:
ERROR TypeError: Cannot read property 'isFirstChange' of undefined
at Ng2YaTableComponent.ngOnChanges (index.js:256)
I have made separate component for table and using this component in other components. Below is the code of my table component.
Below is my code:
`
@Input() data: any[] = [];
@Input() columns: any[] = [];
constructor() {
}
public options:any = {
orderMulti: false,
className: ['table-striped'],
language: "en"
}
public paging: any = {
itemsPerPage: 10,
itemsPerPageOptions: [10, 25, 50, 100],
maxSize: 5
}
`
<ng2-ya-table [options]="options" [columns]="columns" [datasource]="data" [paging]="paging"> </ng2-ya-table>
I am getting data and columns from another component and they are successfully reaching to this component. What am I missing here?
not supporting on electron
Hi how could i add a column containing a dropdown menu. The dropdown menu items would need to navigate to other pages using routerLink and would also need to call functions on the component.
Thanks
How to change the language in the elements?
Hi,
When you install the package the ngx-bootstrap package is missing.
Maybe you can add it to the package.json so it gets installed automatically.
I had two buttons defined in columns as below
{
title: 'Action',
name: 'Action',
sort: false,
defaultSortOrder: 'asc',
render: (data: any, row: user): string => {
return "<input type='button' style='text-transform: uppercase; color: #fff;line-height: 1.2;background: linear-gradient(to right, #a182e8, #9c8deb,#9899ed,#92a4f1,#90a9f2,#8db0f4,#8cb4f5);font-family: lato-regular;font-size: 15px;padding: 10px;text-align: center;text-transform: uppercase;border: none;border-radius: 12px;' class='accept' value='Accept'>";
},
action: (data: any, row: user): any => {
this.Accept(row.uid);
}
},
{
title: '',
name: 'Action',
sort: false,
defaultSortOrder: 'asc',
render: (data: any, row: user): string => {
return "<input type='button' style='text-transform: uppercase; color: #fff;line-height: 1.2;background: linear-gradient(to right, #a182e8, #9c8deb,#9899ed,#92a4f1,#90a9f2,#8db0f4,#8cb4f5);font-family: lato-regular;font-size: 15px;padding: 10px;text-align: center;text-transform: uppercase;border: none;border-radius: 12px;' class='reject' value='Reject'>";
},
action: (data: any, row: user): any => {
this.Reject(row.uid);
}
}
The single click is not working on buttons. On double click, it works fine. Did not understand why this is happening.
Please look into it.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.