mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 01:25:55 +02:00
Fixed "Loading..." message on datatables with no content
This commit is contained in:
parent
d7e68605c9
commit
e9d03a0c95
1 changed files with 6 additions and 0 deletions
|
@ -145,6 +145,12 @@ export default class extends Controller {
|
|||
|
||||
//Fix height of the length selector
|
||||
promise.then((dt) => {
|
||||
|
||||
//Draw the rows to make sure the correct status text is displayed ("No matching records found" instead of "Loading...")
|
||||
if (dt.data().length === 0) {
|
||||
dt.rows().draw()
|
||||
}
|
||||
|
||||
//Find all length selectors (select with name dt_length), which are inside a label
|
||||
const lengthSelectors = document.querySelectorAll('label select[name="dt_length"]');
|
||||
//And remove the surrounding label, while keeping the select with all event handlers
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue