datatable.directory codebase https://datatable.directory/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
datatable.directory/resources/assets/js/components/DraftNotePage.js

21 lines
409 B

import { query } from './table-editor-utils'
export default function (dataRoute) {
let $note = $('#field-note')
let lastText = $note.val()
let handler = _.debounce(function () {
query(dataRoute, {
action: 'note.set',
text: lastText
})
}, 350)
$note.on('input', () => {
let text = $note.val()
if (text !== lastText) {
lastText = text
handler()
}
})
}