Front/JS & jQuery

[js][datatables] fnRecordsDisplay()

오선지♬ 2025. 2. 20. 20:02
728x90
반응형
if (this.$table.dataTable().fnSettings().fnRecordsDisplay() > 0) {
    // Execute logic if there are records displayed
}
  • this.$table.dataTable()DataTable 인스턴스를 초기화하거나 검색합니다.
  • .fnSettings()DataTables의 내부 설정 개체를 가져옵니다.
  • .fnRecordsDisplay()적용된 필터를 고려하여 현재 표시된 레코드 수를 반환합니다.

 

728x90
반응형