Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
DetailsList-FluentUI
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Sonia Vidal Gonzalez
DetailsList-FluentUI
Commits
cca88806
Commit
cca88806
authored
Sep 23, 2021
by
Sonia Vidal Gonzalez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Añadiendo panel derecho.
parent
7dff800b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
8 deletions
+52
-8
HomeDetailsList.tsx
src/webparts/homeDetailsList/components/HomeDetailsList.tsx
+52
-6
IHomeDetailsListProps.ts
...parts/homeDetailsList/components/IHomeDetailsListProps.ts
+0
-2
No files found.
src/webparts/homeDetailsList/components/HomeDetailsList.tsx
View file @
cca88806
...
@@ -6,7 +6,9 @@ import { DetailsList, DetailsListLayoutMode, Selection, IColumn } from 'office-u
...
@@ -6,7 +6,9 @@ import { DetailsList, DetailsListLayoutMode, Selection, IColumn } from 'office-u
import
{
MarqueeSelection
}
from
'office-ui-fabric-react/lib/MarqueeSelection'
;
import
{
MarqueeSelection
}
from
'office-ui-fabric-react/lib/MarqueeSelection'
;
import
{
Fabric
}
from
'office-ui-fabric-react/lib/Fabric'
;
import
{
Fabric
}
from
'office-ui-fabric-react/lib/Fabric'
;
import
{
mergeStyles
}
from
'office-ui-fabric-react/lib/Styling'
;
import
{
mergeStyles
}
from
'office-ui-fabric-react/lib/Styling'
;
import
{
PrimaryButton
}
from
'@microsoft/office-ui-fabric-react-bundle'
;
import
{
DefaultButton
,
PrimaryButton
}
from
'@microsoft/office-ui-fabric-react-bundle'
;
import
{
Panel
,
PanelType
}
from
'office-ui-fabric-react'
;
const
exampleChildClass
=
mergeStyles
({
const
exampleChildClass
=
mergeStyles
({
...
@@ -27,6 +29,7 @@ export interface IDetailsListBasicExampleState {
...
@@ -27,6 +29,7 @@ export interface IDetailsListBasicExampleState {
items
:
IDetailsListBasicExampleItem
[];
items
:
IDetailsListBasicExampleItem
[];
selectionDetails
:
string
;
selectionDetails
:
string
;
itemsAux
:
IDetailsListBasicExampleItem
[];
itemsAux
:
IDetailsListBasicExampleItem
[];
showPanel
:
boolean
;
}
}
export
default
class
HomeDetailsList
extends
React
.
Component
<
IHomeDetailsListProps
,
IDetailsListBasicExampleState
>
{
export
default
class
HomeDetailsList
extends
React
.
Component
<
IHomeDetailsListProps
,
IDetailsListBasicExampleState
>
{
...
@@ -68,7 +71,8 @@ export default class HomeDetailsList extends React.Component<IHomeDetailsListPro
...
@@ -68,7 +71,8 @@ export default class HomeDetailsList extends React.Component<IHomeDetailsListPro
],
],
selectionDetails
:
''
,
selectionDetails
:
''
,
itemsAux
:
[]
itemsAux
:
[],
showPanel
:
false
};
};
this
.
_selection
=
new
Selection
({
this
.
_selection
=
new
Selection
({
...
@@ -90,13 +94,14 @@ export default class HomeDetailsList extends React.Component<IHomeDetailsListPro
...
@@ -90,13 +94,14 @@ export default class HomeDetailsList extends React.Component<IHomeDetailsListPro
public
render
():
React
.
ReactElement
<
IHomeDetailsListProps
>
{
public
render
():
React
.
ReactElement
<
IHomeDetailsListProps
>
{
const
{
items
,
itemsAux
,
selectionDetails
}
=
this
.
state
;
const
{
items
,
itemsAux
,
selectionDetails
}
=
this
.
state
;
const
{
disabled
,
checked
}
=
this
.
props
function
_alertClicked
():
void
{
function
_alertClicked
():
void
{
alert
(
'Clicked'
);
alert
(
'Clicked'
);
}
}
return
(
return
(
<
Fabric
>
<
Fabric
>
<
div
className=
{
exampleChildClass
}
>
{
selectionDetails
}
</
div
>
<
div
className=
{
exampleChildClass
}
>
{
selectionDetails
}
</
div
>
...
@@ -122,14 +127,55 @@ export default class HomeDetailsList extends React.Component<IHomeDetailsListPro
...
@@ -122,14 +127,55 @@ export default class HomeDetailsList extends React.Component<IHomeDetailsListPro
onItemInvoked=
{
this
.
_onItemInvoked
}
onItemInvoked=
{
this
.
_onItemInvoked
}
/>
/>
<
br
/>
<
br
/>
<
PrimaryButton
text=
"Añadir Productos"
onClick=
{
_alertClicked
}
allowDisabledFocus
disabled=
{
disabled
}
checked=
{
checked
}
/>
<
div
>
<
div
>
<
PrimaryButton
secondaryText=
'Opens the Sample Panel'
onClick=
{
this
.
_onShowPanel
}
text=
'Open Panel'
/>
<
Panel
isOpen=
{
this
.
state
.
showPanel
}
type=
{
PanelType
.
smallFixedFar
}
onDismiss=
{
this
.
_onClosePanel
}
isFooterAtBottom=
{
true
}
headerText=
'Panel with footer at bottom'
closeButtonAriaLabel=
'Close'
onRenderFooterContent=
{
this
.
_onRenderFooterContent
}
>
<
span
>
Content goes here.
</
span
>
</
Panel
>
</
div
>
</
div
>
</
MarqueeSelection
>
</
MarqueeSelection
>
</
Fabric
>
</
Fabric
>
);
);
}
}
private
_onShowPanel
=
()
=>
{
this
.
setState
({
showPanel
:
true
});
}
private
_onClosePanel
=
()
=>
{
this
.
setState
({
showPanel
:
false
});
}
private
_onRenderFooterContent
=
():
JSX
.
Element
=>
{
return
(
<
div
>
<
PrimaryButton
onClick=
{
this
.
_onClosePanel
}
style=
{
{
'marginRight'
:
'8px'
}
}
>
Save
</
PrimaryButton
>
<
DefaultButton
onClick=
{
this
.
_onClosePanel
}
>
Cancel
</
DefaultButton
>
</
div
>
);
}
private
_getSelectionDetails
():
string
{
private
_getSelectionDetails
():
string
{
const
selectionCount
=
this
.
_selection
.
getSelectedCount
();
const
selectionCount
=
this
.
_selection
.
getSelectedCount
();
...
...
src/webparts/homeDetailsList/components/IHomeDetailsListProps.ts
View file @
cca88806
export
interface
IHomeDetailsListProps
{
export
interface
IHomeDetailsListProps
{
description
:
string
;
description
:
string
;
disabled
?:
boolean
;
checked
?:
boolean
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment