Table Grid mode
-
In table Grid mode, How I can change the status 0/1 to word??
When I call api status value is 0/1, but I want it display in word. Tq
-
what do you mean with:
status 0/1 to word
You will be better helped if you put your code in the comment or in a codepen.io.
-
@ak101 Do you wish to also display it as a word in row mode? Or if you don’t use row mode at all, the same answer applies:
{ name: 'status', label: 'Status', field: 'status', format: val => val ? 'Enabled' : 'Disabled', },
If you use both grid and row mode, and don’t want it displayed as a word in row mode, you’d need to use
item
scoped slot. -
@beets for my table list it is already display Inactive and Active. When I go to grid mode, It is display 0 /1 because the value call from api is 0 / 1, I don know how to change the value in grid, for table can.
-
-
@dobbel https://codepen.io/Adriantango/pen/MWymeEQ?editors=1010
this is before call the api, I m beginner, I not very sure how to write it in code pen -
-
-
I used this code to display the action/Inactive when I call from API value is 0/1
field: row => row.status == ‘0’ ? ‘Inactive’ : ‘Active’,