Просмотр исходного кода

Merge pull request #1725 from weseek/feat/1312-two-check-boxes

added "chacked" and "onChange" function
Yuki Takei 6 лет назад
Родитель
Сommit
892e133c6b

+ 4 - 0
src/client/js/components/Admin/Notification/GlobalNotification.jsx

@@ -54,6 +54,8 @@ class GlobalNotification extends React.Component {
               <input
                 id="isNotificationForOwnerPageEnabled"
                 type="checkbox"
+                checked={adminNotificationContainer.state.isNotificationForOwnerPageEnabled || false}
+                onChange={() => { adminNotificationContainer.switchIsNotificationForOwnerPageEnabled() }}
               />
               <label htmlFor="isNotificationForOwnerPageEnabled">
                 {/* eslint-disable-next-line react/no-danger */}
@@ -71,6 +73,8 @@ class GlobalNotification extends React.Component {
               <input
                 id="isNotificationForGroupPageEnabled"
                 type="checkbox"
+                checked={adminNotificationContainer.state.isNotificationForGroupPageEnabled || false}
+                onChange={() => { adminNotificationContainer.switchIsNotificationForGroupPageEnabled() }}
               />
               <label htmlFor="isNotificationForGroupPageEnabled">
                 {/* eslint-disable-next-line react/no-danger */}