1import{_ as w,Q as y}from"./CVHcEG9y.js";import{m as x,r as l,p as C,n as S,q as N,o as z,c as P,a as o,b as g,d as T,G as V,H as A,u as n}from"./BGdjmYZ0.js";const B={class:"flex items-center justify-between mb-5"},U={target:"_blank",href:"https://github.com/bhaveshpatel200/vue3-datatable-document/blob/main/pages/custom-message.vue",class:"btn"},j={class:"mb-5"},q=x({__name:"custom-message",setup(k){const c=l(!0),u=l(0),e=C({...{current_page:1,pagesize:10,search:"",column_filters:[]}}),d=l(null),f=l([{field:"id",title:"ID",isUnique:!0,type:"number"},{field:"firstName",title:"First Name"},{field:"lastName",title:"Last Name"},{field:"email",title:"Email"},{field:"age",title:"Age",type:"number"},{field:"dob",title:"Birthdate",type:"date"},{field:"address.city",title:"City"},{field:"isActive",title:"Active",type:"bool"}]);S(()=>{r()});let i,m;const h=()=>{clearTimeout(m),m=setTimeout(()=>{r()},300)},r=async()=>{var t;try{i&&i.abort(),i=new AbortController;const a=i.signal;c.value=!0;const s=await(await fetch("/api/user",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(N(e)),signal:a})).json();d.value=s==null?void 0:s.data,u.value=(t=s==null?void 0:s.meta)==null?void 0:t.total}catch{}c.value=!1},_=t=>{e.current_page=t,r()},b=t=>{e.pagesize=t,e.current_page=1,r()},v=t=>{e.search=t,e.current_page=1,h()};return(t,a)=>{const p=w;return z(),P("div",null,[o("div",B,[a[2]||(a[2]=o("h2",{class:"text-3xl"},"Custom text for no data and pagination info",-1)),o("a",U,[g(p,{class:"w-5 h-5 mr-2"}),a[1]||(a[1]=T(" View Source "))])]),o("div",j,[V(o("input",{"onUpdate:modelValue":a[0]||(a[0]=s=>n(e).search=s),type:"text",class:"form-input max-w-xs",placeholder:"Search..."},null,512),[[A,n(e).search]])]),g(n(y),{rows:d.value,columns:f.value,loading:c.value,totalRows:u.value,isServerMode:!0,pageSize:n(e).pagesize,search:n(e).search,noDataContent:"No records found in the database.",paginationInfo:"ÐÑобÑажение Ð¾Ñ {0} до {1} запиÑей из {2} запиÑей",onPageChange:_,onPageSizeChange:b,onSearchChange:v},null,8,["rows","columns","loading","totalRows","pageSize","search"])])}}});export{q as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.