@@ -16,8 +16,8 @@ import { NimbleCheckbox } from '@ni/nimble-react/checkbox';
1616import { NimbleRadioGroup } from '@ni/nimble-react/radio-group' ;
1717import { NimbleRadio } from '@ni/nimble-react/radio' ;
1818import { NimbleTextField } from '@ni/nimble-react/text-field' ;
19- import { NimbleDialog , type Dialog , type DialogRef , DialogUserDismissed } from '@ni/nimble-react/dialog' ;
20- import { NimbleDrawer , type Drawer , type DrawerRef , DrawerUserDismissed , DrawerLocation } from '@ni/nimble-react/drawer' ;
19+ import { NimbleDialog , type Dialog , DialogUserDismissed , fromDialogRef } from '@ni/nimble-react/dialog' ;
20+ import { NimbleDrawer , type Drawer , DrawerUserDismissed , DrawerLocation , fromDrawerRef } from '@ni/nimble-react/drawer' ;
2121import { NimbleMenu } from '@ni/nimble-react/menu' ;
2222import { NimbleMenuItem , type MenuItemChangeEvent } from '@ni/nimble-react/menu-item' ;
2323import { NimbleAnchorMenuItem } from '@ni/nimble-react/anchor-menu-item' ;
@@ -27,7 +27,7 @@ import { NimbleIconCheck } from '@ni/nimble-react/icons/check';
2727import { NimbleIconXmarkCheck } from '@ni/nimble-react/icons/xmark-check' ;
2828import { NimbleSpinner } from '@ni/nimble-react/spinner' ;
2929import { NimbleSwitch } from '@ni/nimble-react/switch' ;
30- import { NimbleTable , type Table , type TableRef , type TableRowExpandToggleEvent , type TableRecord , type TableSetRecordHierarchyOptions } from '@ni/nimble-react/table' ;
30+ import { NimbleTable , type Table , type TableRowExpandToggleEvent , type TableRecord , type TableSetRecordHierarchyOptions , fromTableRef } from '@ni/nimble-react/table' ;
3131import { NimbleTableColumnText } from '@ni/nimble-react/table-column/text' ;
3232import { NimbleTableColumnAnchor } from '@ni/nimble-react/table-column/anchor' ;
3333import { NimbleTableColumnDateText } from '@ni/nimble-react/table-column/date-text' ;
@@ -668,9 +668,7 @@ export function App(): React.JSX.Element {
668668 < div className = "sub-container" >
669669 < div className = "container-label" > Dialog</ div >
670670 < NimbleDialog
671- // Note: Generic types such as Dialog require using the workaround ref type
672- // See: https://github.com/ni/nimble/issues/2784
673- ref = { dialogRef as unknown as DialogRef }
671+ ref = { fromDialogRef ( dialogRef ) }
674672 >
675673 < span slot = "title" > This is a dialog</ span >
676674 < div > It opened when you pushed the button</ div >
@@ -691,9 +689,7 @@ export function App(): React.JSX.Element {
691689 < div className = "sub-container" >
692690 < div className = "container-label" > Drawer</ div >
693691 < NimbleDrawer
694- // Note: Generic types such as Drawer require using the workaround ref type
695- // See: https://github.com/ni/nimble/issues/2784
696- ref = { drawerRef as unknown as DrawerRef }
692+ ref = { fromDrawerRef ( drawerRef ) }
697693 location = { drawerLocation }
698694 >
699695 < header > This is a drawer</ header >
@@ -931,9 +927,7 @@ export function App(): React.JSX.Element {
931927 < div className = "sub-container" >
932928 < div className = "container-label" > Table</ div >
933929 < NimbleTable
934- // Note: Generic types such as Table require using the workaround ref type
935- // See: https://github.com/ni/nimble/issues/2784
936- ref = { tableRef as unknown as TableRef }
930+ ref = { fromTableRef ( tableRef ) }
937931 idFieldName = "id"
938932 parentIdFieldName = "parentId"
939933 selectionMode = "multiple"
@@ -1028,9 +1022,7 @@ export function App(): React.JSX.Element {
10281022 < div className = "sub-container" >
10291023 < div className = "container-label" > Table with delayed hierarchy</ div >
10301024 < NimbleTable
1031- // Note: Generic types such as Table require using the workaround ref type
1032- // See: https://github.com/ni/nimble/issues/2784
1033- ref = { delayedHierarchyTableRef as unknown as TableRef }
1025+ ref = { fromTableRef ( delayedHierarchyTableRef ) }
10341026 idFieldName = "id" parentIdFieldName = "parentId" selectionMode = "multiple"
10351027 onRowExpandToggle = { onRowExpandToggle }
10361028 >
0 commit comments