Skip to main content

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
NameType
expandRecordParamsIExpandRecord
Returns

void