|
@@ -61,6 +61,7 @@ interface IWidget {
|
|
|
onLoad?: Function;
|
|
onLoad?: Function;
|
|
|
onAnthologySelect?: Function;
|
|
onAnthologySelect?: Function;
|
|
|
onTitle?: Function;
|
|
onTitle?: Function;
|
|
|
|
|
+ onArticleEdit?: Function;
|
|
|
}
|
|
}
|
|
|
const ArticleWidget = ({
|
|
const ArticleWidget = ({
|
|
|
type,
|
|
type,
|
|
@@ -80,6 +81,7 @@ const ArticleWidget = ({
|
|
|
onLoad,
|
|
onLoad,
|
|
|
onAnthologySelect,
|
|
onAnthologySelect,
|
|
|
onTitle,
|
|
onTitle,
|
|
|
|
|
+ onArticleEdit,
|
|
|
}: IWidget) => {
|
|
}: IWidget) => {
|
|
|
const [currId, setCurrId] = useState(articleId);
|
|
const [currId, setCurrId] = useState(articleId);
|
|
|
useEffect(() => setCurrId(articleId), [articleId]);
|
|
useEffect(() => setCurrId(articleId), [articleId]);
|
|
@@ -94,6 +96,11 @@ const ArticleWidget = ({
|
|
|
mode={mode}
|
|
mode={mode}
|
|
|
anthologyId={anthologyId}
|
|
anthologyId={anthologyId}
|
|
|
active={active}
|
|
active={active}
|
|
|
|
|
+ onArticleEdit={(value: IArticleDataResponse) => {
|
|
|
|
|
+ if (typeof onArticleEdit !== "undefined") {
|
|
|
|
|
+ onArticleEdit(value);
|
|
|
|
|
+ }
|
|
|
|
|
+ }}
|
|
|
onArticleChange={(type: ArticleType, id: string, target: string) => {
|
|
onArticleChange={(type: ArticleType, id: string, target: string) => {
|
|
|
if (typeof onArticleChange !== "undefined") {
|
|
if (typeof onArticleChange !== "undefined") {
|
|
|
onArticleChange(type, id, target);
|
|
onArticleChange(type, id, target);
|