lahcen er-rich
lahcen er-rich

Reputation: 1

ng2-smart-table custom slider

I am using ng2-smart-table in Angular. I had an action column which has add update delete functionalities (which works fine, no issue with this).

in the first column( check the picture below) I have a column called "Status" where the user can enable/disable a job in the Backend. I want to create a Slider below Column Status name (highlighted below, at filter position) where the user can enable/disable all jobs.

How will I achieve this? I tried to override the "Add New" button to achieve what I need, but it didn't work.

Note: I am using a child component to render the slider for each row.

image

Upvotes: 0

Views: 611

Answers (1)

shiyayonn
shiyayonn

Reputation: 1

I believe you can utilize the Custom property in the Table Settings like this

Status: {
            'title': 'Status',
            type: 'custom',
            filter: false,
            renderComponent: StatusComponent,
            valuePrepareFunction: (value, row, cell) => {
                return row;
            },

Upvotes: 0

Related Questions