|
|
|
@ -7,7 +7,7 @@ import './styles/dropdown-panel.css' |
|
|
|
|
|
|
|
|
|
export const DropdownPanel = (props: DropdownPanelProps) => { |
|
|
|
|
const [calldataObj, dispatch] = useReducer(reducer, initialState) |
|
|
|
|
const { dropdownName, dropdownMessage, calldata, header, loading, extractFunc, formatSelfFunc, registerEvent, triggerEvent, loadMoreEvent, loadMoreCompletedEvent, headStyle, bodyStyle, hexHighlight } = props |
|
|
|
|
const { dropdownName, className, dropdownMessage, calldata, header, loading, extractFunc, formatSelfFunc, registerEvent, triggerEvent, loadMoreEvent, loadMoreCompletedEvent, headStyle, bodyStyle, hexHighlight } = props |
|
|
|
|
const extractDataDefault: ExtractFunc = (item, parent?) => { |
|
|
|
|
const ret: ExtractData = {} |
|
|
|
|
|
|
|
|
@ -194,7 +194,7 @@ export const DropdownPanel = (props: DropdownPanelProps) => { |
|
|
|
|
const uniquePanelName = dropdownName.split(' ').join('') |
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
|
<div className={props.className + " border rounded px-1 mt-1 bg-light"}> |
|
|
|
|
<div className={className + " border rounded px-1 mt-1 bg-light"}> |
|
|
|
|
<div className="py-0 px-1 title" style={headStyle}> |
|
|
|
|
<div className={state.toggleDropdown ? 'icon fas fa-caret-down' : 'icon fas fa-caret-right'} onClick={handleToggle}></div> |
|
|
|
|
<div className="name" data-id={`dropdownPanel${uniquePanelName}`} onClick={handleToggle}>{dropdownName}</div><span className="nameDetail" onClick={handleToggle}>{header}</span> |
|
|
|
|