dynamic looping column

Hi guys, i need ur help. I have some task and i need to show each task as column. currently i have showing the column, but when im using formatStateUsing the value/state is empty even i have just return string its still not showing anything just column name shown
No description
13 Replies
Jany
Jany5mo ago
I think, that you are in wrong context? How can you call $this->getRecord in table? It is dependant upon each row, not global ....
toeknee
toeknee5mo ago
So no need for getRecord just call $record isntead of state. The problem is with columns with no value state is empty. so
->formatStateUsing(fn($record) => $record->value)
->formatStateUsing(fn($record) => $record->value)
Crankshaft
CrankshaftOP5mo ago
its managerelatedrecord, getRecord for get record from parent record
toeknee
toeknee5mo ago
So it's more a dynamic column approach I see now.
Jany
Jany5mo ago
You cannot make table width make dynamic based on maximal count of $tugas, that is excel way of duing things. If you now that max 3 items are in relationship why use one column and add it to it... *why not You can, but I see no point in doing so ....
Crankshaft
CrankshaftOP5mo ago
the concept like, i have user and task which done or not, i want show all task of each user
Jany
Jany5mo ago
Ok, why next to each other?
Crankshaft
CrankshaftOP5mo ago
is it has alternative way?
Jany
Jany5mo ago
It can be in one column line one per line *like
Crankshaft
CrankshaftOP5mo ago
idk, client needs😆
Jany
Jany5mo ago
Or you can create resource just for tasks and add column user on the left of that Well, the question is if client needs it, or wants it 😄 if user has like 100 taks, how will the table look?
Crankshaft
CrankshaftOP5mo ago
wants it i mean, like virtual classroom system where the teacher can see whether all students have completed their work for a subject. The teacher can easily determine whether the student will pass or not.
Jany
Jany5mo ago
I still do not see that need. You can list all tasks for user in one column.
Want results from more Discord servers?
Add your server