home / docs / sections_fts

Menu

sections_fts: 98

This data as json

rowid title content
98 Returned control object A plugin that wants to handle a field should return an object. Datasette currently recognizes these properties: useTextarea - boolean, optional If true, Datasette creates a <textarea> as the underlying field.input before calling render() . If omitted, Datasette chooses either an <input> or <textarea> based on the column type and current value. render(field) - function Called once to render the custom field UI. field is a helper object described below. The recommended pattern is to return a DOM node from render() . Datasette appends that node to field.root , a <div> inside the control area for that field in the row insert/edit dialog. A plugin can alternatively manipulate field.root directly and return nothing. focus(field) - function, optional Called when Datasette wants to focus this field, for example when focusing the first editable field in the dialog. Use this to focus the most useful interactive element inside the custom UI. destroy(field) - function, optional Called when Datasette tears down the insert/edit form. Use this to remove event listeners, close nested pickers, revoke object URLs, clear timers, or release other resources.
Powered by Datasette · Queries took 3.795ms