File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
resources/js/admin/logs/components/Logs/BaseTable Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -44,18 +44,18 @@ export default {
4444 },
4545 methods: {
4646 getItemValue (item , column ) {
47- // if key is a dot-separated string, get the nested value from the item
48- if ( column .key .includes (' . ' )) {
49- return column .key .split (' . ' ).reduce ((val , part ) => (val != null ? val[part] : undefined ), item);
50- }
47+ // Get value - handle dot-separated keys for nested properties
48+ const value = column .key .includes (" . " )
49+ ? column .key .split (" . " ).reduce ((val , part ) => (val == null ? undefined : val[part]), item)
50+ : item[ column . key ];
5151
52- if (typeof column .format === ' function' ) {
53- return column .format (item[column .key ]);
52+ // Apply format function if provided
53+ if (typeof column .format === " function" ) {
54+ return column .format (value);
5455 }
5556
56- return item[ column . key ] ;
57+ return value ;
5758 },
5859 },
5960};
6061 </script >
61-
You can’t perform that action at this time.
0 commit comments