![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
import DockLayout from 'rc-dock'
import "rc-dock/dist/rc-dock.css";
...
defaultLayout = {
dockbox: {
mode: 'horizontal',
children: [
{
tabs: [
{id: 'tab1', title: 'tab1', content: <div>Hello World</div>}
]
}
]
}
};
render() {
return (
<DockLayout
defaultLayout={defaultLayout}
style={{
position: "absolute",
left: 10,
top: 10,
right: 10,
bottom: 10,
}}
/>
)
}
Property | Type | Comments | Default |
---|---|---|---|
dockbox | BoxData | main dock box | empty BoxData |
floatbox | BoxData | main float box, children can only be PanelData | empty BoxData |
a box is the layout element that contains other boxes or panels
Property | Type | Comments | Default |
---|---|---|---|
mode | 'horizontal' | 'vertical' | 'float' | layout mode of the box | |
children | (BoxData | PanelData)[] | children boxes or panels | required |
a panel is a visiaul container with tabs button in the title bar
Property | Type | Comments | Default |
---|---|---|---|
tabs | TabData[] | children tabs | required |
panelLock | PanelLock | addition information of a panel, this prevents the panel from being removed when there is no tab inside, a locked panel can not be moved to float layer either |
Property | Type | Comments | Default |
---|---|---|---|
id | string | unique id | required |
title | string | ReactElement | tab title | required |
content | ReactElement | (tab: TabData) => ReactElement | tab content | required |
closable | bool | whether tab can be closed | false |
group | string | tabs with different tab group can not be put in same panel, more options for the group can be defined as TabGroup in DefaultLayout.groups |
get the ref
of the DockLayout component to use the following API
save layout
saveLayout(): SavedLayout
load layout
loadLayout(savedLayout: SavedLayout): void
move a tab or a panel, if source is already in the layout, you can use the find method to get it with id first
dockMove(source: TabData | PanelData, target: string | TabData | PanelData | BoxData, direction: DropDirection): void;
find PanelData or TabData by id
find(id: string): PanelData | TabData;
update a tab with new TabData
returns false if the tab is not found
updateTab(id: string, newTab: TabData): boolean;
FAQs
dock layout for react component
The npm package rc-dock receives a total of 3,535 weekly downloads. As such, rc-dock popularity was classified as popular.
We found that rc-dock demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.