searching & pagination

This commit is contained in:
Sas Andy
2024-05-22 08:40:54 +07:00
parent b1dc143e83
commit e6afeb74b8
4 changed files with 121 additions and 4 deletions

View File

@@ -11,7 +11,9 @@ templ MdUserGroupScreen(
paginationID string,
searchID string,
breadcrumb templ.Component,
tablecontent templ.Component) {
tablecontent templ.Component,
filterComponent templ.Component,
paginationComponent templ.Component) {
<div class="container-fluid">
@customtextfield.CustomTextFieldv2(models.CustomTextFieldv2Prm{ID: "tableID",
Name: "tableID",
@@ -47,7 +49,9 @@ templ MdUserGroupScreen(
>Add New</button>
</div>
</div>
@filterComponent
@tablecontent
@paginationComponent
</div>
}

View File

@@ -21,7 +21,9 @@ func MdUserGroupScreen(
paginationID string,
searchID string,
breadcrumb templ.Component,
tablecontent templ.Component) templ.Component {
tablecontent templ.Component,
filterComponent templ.Component,
paginationComponent templ.Component) templ.Component {
return templ.ComponentFunc(func(ctx context.Context, templ_7745c5c3_W io.Writer) (templ_7745c5c3_Err error) {
templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templ_7745c5c3_W.(*bytes.Buffer)
if !templ_7745c5c3_IsBuffer {
@@ -71,10 +73,18 @@ func MdUserGroupScreen(
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = filterComponent.Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = tablecontent.Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = paginationComponent.Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err