Previews

No matching results.

x
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<div id="table_5793709857">
<div class="lui-table lui-table--tree-mode" id="table_5793709857" data-controller="table" data-table-data-source-id-value="_data_source" data-table-float-bar-outlet="#table_5793709857 .lui-table__floating_bar .lui-float_bar">
<div data-react-class="Table" data-react-props="{"uniqueId":"table_5793709857","id":"","lang":"en","columns":[{"title":"Name","dataIndex":"name","type":"html","className":"lui-table__cell lui-table__cell--n0 lui-table__cell--first","hidable":true},{"title":"Features","dataIndex":"features","type":"html","className":"lui-table__cell lui-table__cell--n1","hidable":true},{"title":"Created At","dataIndex":"created_at","type":"html","className":"lui-table__cell lui-table__cell--n2 lui-table__cell--last","hidable":true}],"dataSource":[{"name":"\u003cspan class=\"lui-table__cell-content\" style=\"\" id=\"table_5793709857_cell_6597424226\" data-table-target=\"cell\"\u003e\n \u003cdiv class=\"lui-table__cell-content_slot\"\u003e\n \u003cdiv class=\"lui-tooltip hidden\"\n data-controller=\"tooltips\"\n data-tooltips-tippy-target-id-value=\"\"\n data-tooltips-position-value=\"top\"\n data-tooltips-interactive-value=\"false\"\n \u003e\n\u003c/div\u003e\n\n \u003cdiv class=\"whitespace-nowrap w-[200px]\"\u003eCategory 1\u003c/div\u003e\n \u003c/div\u003e\n \u003cdiv class=\"flex flex-row items-center justify-center\"\u003e\n \n \u003c/div\u003e\n\u003c/span\u003e\n","children":[{"name":"\u003cspan class=\"lui-table__cell-content\" style=\"\" id=\"table_5793709857_cell_9912568611\" data-table-target=\"cell\"\u003e\n \u003cdiv class=\"lui-table__cell-content_slot\"\u003e\n \u003cdiv class=\"lui-tooltip hidden\"\n data-controller=\"tooltips\"\n data-tooltips-tippy-target-id-value=\"\"\n data-tooltips-position-value=\"top\"\n data-tooltips-interactive-value=\"false\"\n \u003e\n\u003c/div\u003e\n\n \u003cdiv class=\"whitespace-nowrap w-[200px]\"\u003e Category 1.1\n\u003c/div\u003e\n \u003c/div\u003e\n \u003cdiv class=\"flex flex-row items-center justify-center\"\u003e\n \n \u003c/div\u003e\n\u003c/span\u003e\n","_lui_key":"Category 1.1_0}","_lui_data":{"delete_action":null}},{"name":"\u003cspan class=\"lui-table__cell-content\" style=\"\" id=\"table_5793709857_cell_2322156580\" data-table-target=\"cell\"\u003e\n \u003cdiv class=\"lui-table__cell-content_slot\"\u003e\n \u003cdiv class=\"lui-tooltip hidden\"\n data-controller=\"tooltips\"\n data-tooltips-tippy-target-id-value=\"\"\n data-tooltips-position-value=\"top\"\n data-tooltips-interactive-value=\"false\"\n \u003e\n\u003c/div\u003e\n\n \u003cdiv class=\"whitespace-nowrap w-[200px]\"\u003e Category 1.2\n\u003c/div\u003e\n \u003c/div\u003e\n \u003cdiv class=\"flex flex-row items-center justify-center\"\u003e\n \n \u003c/div\u003e\n\u003c/span\u003e\n","_lui_key":"Category 1.2_1}","_lui_data":{"delete_action":null}}],"_lui_key":"Category 1_0}","_lui_data":{"delete_action":null}},{"name":"\u003cspan class=\"lui-table__cell-content\" style=\"\" id=\"table_5793709857_cell_5215854990\" data-table-target=\"cell\"\u003e\n \u003cdiv class=\"lui-table__cell-content_slot\"\u003e\n \u003cdiv class=\"lui-tooltip hidden\"\n data-controller=\"tooltips\"\n data-tooltips-tippy-target-id-value=\"\"\n data-tooltips-position-value=\"top\"\n data-tooltips-interactive-value=\"false\"\n \u003e\n\u003c/div\u003e\n\n \u003cdiv class=\"whitespace-nowrap w-[200px]\"\u003eCategory 2\u003c/div\u003e\n \u003c/div\u003e\n \u003cdiv class=\"flex flex-row items-center justify-center\"\u003e\n \n \u003c/div\u003e\n\u003c/span\u003e\n","children":[{"name":"\u003cspan class=\"lui-table__cell-content\" style=\"\" id=\"table_5793709857_cell_8670528836\" data-table-target=\"cell\"\u003e\n \u003cdiv class=\"lui-table__cell-content_slot\"\u003e\n \u003cdiv class=\"lui-tooltip hidden\"\n data-controller=\"tooltips\"\n data-tooltips-tippy-target-id-value=\"\"\n data-tooltips-position-value=\"top\"\n data-tooltips-interactive-value=\"false\"\n \u003e\n\u003c/div\u003e\n\n \u003cdiv class=\"whitespace-nowrap w-[200px]\"\u003e Category 2.1\n\u003c/div\u003e\n \u003c/div\u003e\n \u003cdiv class=\"flex flex-row items-center justify-center\"\u003e\n \n \u003c/div\u003e\n\u003c/span\u003e\n","_lui_key":"Category 2.1_0}","_lui_data":{"delete_action":null}},{"name":"\u003cspan class=\"lui-table__cell-content\" style=\"\" id=\"table_5793709857_cell_9451751915\" data-table-target=\"cell\"\u003e\n \u003cdiv class=\"lui-table__cell-content_slot\"\u003e\n \u003cdiv class=\"lui-tooltip hidden\"\n data-controller=\"tooltips\"\n data-tooltips-tippy-target-id-value=\"\"\n data-tooltips-position-value=\"top\"\n data-tooltips-interactive-value=\"false\"\n \u003e\n\u003c/div\u003e\n\n \u003cdiv class=\"whitespace-nowrap w-[200px]\"\u003e Category 2.2\n\u003c/div\u003e\n \u003c/div\u003e\n \u003cdiv class=\"flex flex-row items-center justify-center\"\u003e\n \n \u003c/div\u003e\n\u003c/span\u003e\n","_lui_key":"Category 2.2_1}","_lui_data":{"delete_action":null}}],"_lui_key":"Category 2_1}","_lui_data":{"delete_action":null}}],"pagination":{"current":1,"pageSize":15,"total":0},"searchQuery":null,"globalFiltersHtml":null,"tableHeader":"\u003cdiv class=\"lui-table_header\" data-controller=\"table-filters\"\u003e\n \u003cdiv class=\"w-80\"\u003e\n \u003cdiv data-controller=\"search\"\n id=\"looposui-inputs-search_table__search_input_1569762617\"\n class=\"lui-search\"\n data-search-input-outlet=\"#looposui-inputs-search_table__search_input_1569762617 .lui-inner-input\"\n data-search-event-only-value=\"true\"\n \u003e\n \n \u003cdiv data-controller=\"input\" data-input-open-actions-value=\"false\" class=\"lui-inner-input relative flex gap-2\"\n data-input-original-input-value=\"\"\n data-input-mode-value=\"autosubmit\"\n data-input-form-value=\"\"\u003e\n \u003cdiv class=\"w-full flex flex-col\"\u003e\n \u003cspan class=\"lui-input \"\u003e\n \u003cspan class=\"lui-input__addon-left\"\u003e\n \u003cdiv class=\"text-[12px] flex items-center text-center\"\u003e\n \u003ci class=\"fa-regular fa-magnifying-glass text-gray-400\"\u003e\u003c/i\u003e\n \u003c/div\u003e\n\n \u003c/span\u003e\n \u003cinput name=\"table__search_input\" type=\"search\" placeholder=\"Search by...\" class=\"lui-input__input\" mode=\"autosubmit\" contentEditable=\"true\" data-input-target=\"input\" data-action=\"input-\u0026gt;search#toggleClearButton input-\u0026gt;input#setEditing input-\u0026gt;search#onInput change-\u0026gt;search#onInput\" data-search-target=\"input\"\u003e\n \u003cspan class=\"lui-input__addon-right\"\u003e\n \u003cspan class=\"flex\"\u003e\n \u003ci class=\"fa-regular fa-xmark cursor-pointer text-gray-400\"\n data-search-target=\"clearButton\"\n data-action=\"click-\u003esearch#clear click-\u003einput#finishEditing\"\u003e\n \u003c/i\u003e\n \u003c/span\u003e\n\n \u003c/span\u003e\n \u003cspan class=\"lui-input__spinner\"\u003e\n \u003ci class=\"fa-regular fa-spinner\"\u003e\u003c/i\u003e\n \u003c/span\u003e\n\u003c/span\u003e \n \n \u003c/div\u003e\n \u003cspan class=\"lui-inner-input__actions opacity-0 flex items-center gap-1 h-fit\" data-input-target=\"actions\"\u003e\n \u003cbutton class=\"lui-button lui-button--neutral--secondary lui-button--size-tiny w-fit w-fit\" data-controller=\"lui--button\" data-input-target=\"cancel\" data-action=\"click-\u0026gt;input#handleClose\" type=\"button\" disabled=\"disabled\"\u003e\n \n \u003ci class=\"lui-button__icon lui-button__icon--tiny fa-regular fa-xmark\" data-lui--button-target=\"leadingIcon\"\u003e\u003c/i\u003e\n \n \n\u003c/button\u003e\n\n \u003cbutton class=\"lui-button lui-button--success--secondary lui-button--size-tiny w-fit w-fit\" data-controller=\"lui--button\" data-input-target=\"submit\" data-action=\"click-\u0026gt;input#setLoading\" type=\"submit\" disabled=\"disabled\"\u003e\n \n \u003ci class=\"lui-button__icon lui-button__icon--tiny fa-regular fa-check\" data-lui--button-target=\"leadingIcon\"\u003e\u003c/i\u003e\n \n \n\u003c/button\u003e\n\n\n \u003c/span\u003e\n \u003c/div\u003e\n\n\u003c/div\u003e\n\n \u003c/div\u003e\n \u003cdiv class=\"hidden\" data-table-filters-target=\"button\"\u003e\n \u003cbutton class=\"lui-button lui-button--neutral--tertiary lui-button--size-small w-fit w-fit\" data-controller=\"lui--button\" data-action=\"click-\u0026gt;table-filters#clearAllFilters\"\u003e\n \n \u003ci class=\"lui-button__icon lui-button__icon--small fa-regular fa-eraser\" data-lui--button-target=\"leadingIcon\"\u003e\u003c/i\u003e\n \u003cspan class=\"lui-button__text\" data-lui--button-target=\"text\"\u003e\n Clear all filters\n\u003c/span\u003e \n \n\u003c/button\u003e\n \u003c/div\u003e\n\u003c/div\u003e\n","footerHtml":null,"filterCounterTemplateHtml":"\n \u003cspan class=\"lui-counter lui-counter--tinny\" style=\"color: #212529; background-color: #F8F9FA; border: var(--Spacings-0, 1px) solid var(--General-Gray-500, #C4CAD0);\"\u003e\n \u003cspan class=\"lui-counter__text\"\u003e:count:\u003c/span\u003e\n\u003c/span\u003e\n","sortingEnabled":false,"view_more":10,"viewMoreHtml":"\u003cbutton class=\"lui-button lui-button--neutral--tertiary lui-button--size-default w-fit w-fit\" data-controller=\"lui--button\"\u003e\n \n \n \u003cspan class=\"lui-button__text\" data-lui--button-target=\"text\"\u003e\n View more\n\u003c/span\u003e \n \n\u003c/button\u003e","fetchUrl":null,"selectable":null,"selectableType":null,"showPagination":true,"showPaginationSizeChanger":true,"showResultCount":true,"searchable":true,"theme":{"token":{"fontFamily":"Satoshi","borderRadius":4,"colorLink":"#212529","colorActive":"#212529","colorHover":"#212529","colorText":"#212529"},"components":{"Table":{"footerBg":"#ffffff","headerBg":"#F8F9FA","headerColor":"#495057","headerSortActiveBg":"#F8F9FA","headerSortHoverBg":"#F8F9FA","headerSortSortBg":"#F8F9FA","bodySortBg":"#ffffff","rowHoverBg":"#F8F9FA","borderColor":"#ECEFF2","headerBorderRadius":4,"rowSelectedBg":"#F8F9FA","rowSelectedHoverBg":"#F8F9FA","selectionColumnWidth":32,"headerSplitColor":"#ECEFF2","cellPaddingInlineSM":16},"Pagination":{"itemActiveBg":"transparent"}}},"treeIndentSize":15,"expandableConfig":{"defaultExpandAllRows":false,"indentSize":15}}" data-react-cache-id="Table-0"></div>
</div>
</div>
<div class="lui-tooltip hidden"
data-controller="tooltips"
data-tooltips-tippy-target-id-value="table_5793709857-collapse-tooltip"
data-tooltips-position-value="top"
data-tooltips-interactive-value="false"
>
<div class="lui-tooltip__title">
Expand/Collapse all
</div>
</div>
<div id="_data_source" class="hidden">
[{"name":"\u003cspan class=\"lui-table__cell-content\" style=\"\" id=\"table_5793709857_cell_6597424226\" data-table-target=\"cell\"\u003e\n \u003cdiv class=\"lui-table__cell-content_slot\"\u003e\n \u003cdiv class=\"lui-tooltip hidden\"\n data-controller=\"tooltips\"\n data-tooltips-tippy-target-id-value=\"\"\n data-tooltips-position-value=\"top\"\n data-tooltips-interactive-value=\"false\"\n \u003e\n\u003c/div\u003e\n\n \u003cdiv class=\"whitespace-nowrap w-[200px]\"\u003eCategory 1\u003c/div\u003e\n \u003c/div\u003e\n \u003cdiv class=\"flex flex-row items-center justify-center\"\u003e\n \n \u003c/div\u003e\n\u003c/span\u003e\n","children":[{"name":"\u003cspan class=\"lui-table__cell-content\" style=\"\" id=\"table_5793709857_cell_9912568611\" data-table-target=\"cell\"\u003e\n \u003cdiv class=\"lui-table__cell-content_slot\"\u003e\n \u003cdiv class=\"lui-tooltip hidden\"\n data-controller=\"tooltips\"\n data-tooltips-tippy-target-id-value=\"\"\n data-tooltips-position-value=\"top\"\n data-tooltips-interactive-value=\"false\"\n \u003e\n\u003c/div\u003e\n\n \u003cdiv class=\"whitespace-nowrap w-[200px]\"\u003e Category 1.1\n\u003c/div\u003e\n \u003c/div\u003e\n \u003cdiv class=\"flex flex-row items-center justify-center\"\u003e\n \n \u003c/div\u003e\n\u003c/span\u003e\n","_lui_key":"Category 1.1_0}","_lui_data":{"delete_action":null}},{"name":"\u003cspan class=\"lui-table__cell-content\" style=\"\" id=\"table_5793709857_cell_2322156580\" data-table-target=\"cell\"\u003e\n \u003cdiv class=\"lui-table__cell-content_slot\"\u003e\n \u003cdiv class=\"lui-tooltip hidden\"\n data-controller=\"tooltips\"\n data-tooltips-tippy-target-id-value=\"\"\n data-tooltips-position-value=\"top\"\n data-tooltips-interactive-value=\"false\"\n \u003e\n\u003c/div\u003e\n\n \u003cdiv class=\"whitespace-nowrap w-[200px]\"\u003e Category 1.2\n\u003c/div\u003e\n \u003c/div\u003e\n \u003cdiv class=\"flex flex-row items-center justify-center\"\u003e\n \n \u003c/div\u003e\n\u003c/span\u003e\n","_lui_key":"Category 1.2_1}","_lui_data":{"delete_action":null}}],"_lui_key":"Category 1_0}","_lui_data":{"delete_action":null}},{"name":"\u003cspan class=\"lui-table__cell-content\" style=\"\" id=\"table_5793709857_cell_5215854990\" data-table-target=\"cell\"\u003e\n \u003cdiv class=\"lui-table__cell-content_slot\"\u003e\n \u003cdiv class=\"lui-tooltip hidden\"\n data-controller=\"tooltips\"\n data-tooltips-tippy-target-id-value=\"\"\n data-tooltips-position-value=\"top\"\n data-tooltips-interactive-value=\"false\"\n \u003e\n\u003c/div\u003e\n\n \u003cdiv class=\"whitespace-nowrap w-[200px]\"\u003eCategory 2\u003c/div\u003e\n \u003c/div\u003e\n \u003cdiv class=\"flex flex-row items-center justify-center\"\u003e\n \n \u003c/div\u003e\n\u003c/span\u003e\n","children":[{"name":"\u003cspan class=\"lui-table__cell-content\" style=\"\" id=\"table_5793709857_cell_8670528836\" data-table-target=\"cell\"\u003e\n \u003cdiv class=\"lui-table__cell-content_slot\"\u003e\n \u003cdiv class=\"lui-tooltip hidden\"\n data-controller=\"tooltips\"\n data-tooltips-tippy-target-id-value=\"\"\n data-tooltips-position-value=\"top\"\n data-tooltips-interactive-value=\"false\"\n \u003e\n\u003c/div\u003e\n\n \u003cdiv class=\"whitespace-nowrap w-[200px]\"\u003e Category 2.1\n\u003c/div\u003e\n \u003c/div\u003e\n \u003cdiv class=\"flex flex-row items-center justify-center\"\u003e\n \n \u003c/div\u003e\n\u003c/span\u003e\n","_lui_key":"Category 2.1_0}","_lui_data":{"delete_action":null}},{"name":"\u003cspan class=\"lui-table__cell-content\" style=\"\" id=\"table_5793709857_cell_9451751915\" data-table-target=\"cell\"\u003e\n \u003cdiv class=\"lui-table__cell-content_slot\"\u003e\n \u003cdiv class=\"lui-tooltip hidden\"\n data-controller=\"tooltips\"\n data-tooltips-tippy-target-id-value=\"\"\n data-tooltips-position-value=\"top\"\n data-tooltips-interactive-value=\"false\"\n \u003e\n\u003c/div\u003e\n\n \u003cdiv class=\"whitespace-nowrap w-[200px]\"\u003e Category 2.2\n\u003c/div\u003e\n \u003c/div\u003e\n \u003cdiv class=\"flex flex-row items-center justify-center\"\u003e\n \n \u003c/div\u003e\n\u003c/span\u003e\n","_lui_key":"Category 2.2_1}","_lui_data":{"delete_action":null}}],"_lui_key":"Category 2_1}","_lui_data":{"delete_action":null}}]
</div>
<div id="_pagination" class="hidden">
{"current":1,"pageSize":15,"total":0}
</div>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<%
columns = [
{
title: "Name",
dataIndex: :name,
},
{
title: "Features",
dataIndex: :features,
},
{
title: "Created At",
dataIndex: :created_at,
}
]
# Example of nested category data
data = [
{
name: "Category 1",
children: [
{
name: "Category 1.1",
children: [
{
name: "Category 1.1.1",
},
{
name: "Category 1.1.2",
}
]
},
{
name: "Category 1.2",
children: [
{
name: "Category 1.2.1",
},
{
name: "Category 1.2.2",
children: [
{
name: "Category 1.2.2.1"
}
]
}
]
}
]
},
{
name: "Category 2",
children: [
{
name: "Category 2.1",
children: [
{
name: "Category 2.1.1",
},
{
name: "Category 2.1.2",
}
]
},
{
name: "Category 2.2",
children: [
{
name: "Category 2.2.1",
},
{
name: "Category 2.2.2",
}
]
}
]
}
]
options = {
tree_indent_size: params[:tree_indent_size] || 15,
columns:,
expandable_config: {
default_expand_all_rows: params[:default_expand_all_rows] || false,
indent_size: params[:indent_size] || 15,
}
}
%>
<%= render LooposUi::V2::Table.new(**options) do |table| %>
<% data.each_with_index do |category, i| %>
<% table.with_row(key: "#{category[:name]}_#{i}}") do |row| %>
<% row.with_cell(property: :name) do %>
<% tag.div(class: "whitespace-nowrap w-[200px]") do %>
<% category[:name] %>
<% end %>
<% end %>
<% (category[:children] || []).each_with_index do |child_category,j| %>
<%= row.with_child(key: "#{child_category[:name]}_#{j}}") do |child_row| %>
<% child_row.with_cell(property: :name) do %>
<% tag.div(class: "whitespace-nowrap w-[200px]") do %>
<%= child_category[:name] %>
<% end %>
<% end %>
<% end %>
<% end %>
<% end %>
<% end %>
<% end %>
Param Description Input

Change this to adjust the tree indent size

Expand all rows by default