useExpandRecord
you can use this methods to initialize, and get a more focused editing experience by executing the function to expand a record modal.
Returns
fn
A function that expands the modal for a record with the specified parameters.
Example
import { useExpandRecord, useRecords } from '@apitable/widget-sdk';
// expand first record
function ExpandFirstRecord() {
const firstRecord = useRecords(view.id)[0];
const expandRecord = useExpandRecord();
return <button onClick={() => expandRecord({recordIds: [firstRecord?.id]})}>Expand first record</button>;
}
▸ (expandRecordParams
): void
Parameters
Name | Type |
---|---|
expandRecordParams | IExpandRecord |
Returns
void