File tree Expand file tree Collapse file tree 4 files changed +32
-2
lines changed
documentation/docs/tutorial/03-Customization Expand file tree Collapse file tree 4 files changed +32
-2
lines changed Original file line number Diff line number Diff line change @@ -519,6 +519,23 @@ Default behavior of the Dialog component will allow user to close it by just cli
519519 </div >
520520</div >
521521
522+ ### Dialog open and close
523+
524+ You can open and close dialog by calling ` open ` and ` close ` methods.
525+
526+ ``` ts
527+
528+ const confirmDialog = ref (null );
529+
530+ const openDialog = () => {
531+ confirmDialog .value .open ();
532+ }
533+
534+ const closeDialog = () => {
535+ confirmDialog .value .close ();
536+ }
537+ ```
538+
522539## Dropzone
523540
524541``` ts
Original file line number Diff line number Diff line change @@ -98,4 +98,17 @@ onUnmounted(() => {
9898 modal .value ?.destroy ();
9999})
100100
101+ function open() {
102+ modal .value ?.show ();
103+ }
104+
105+ function close() {
106+ modal .value ?.hide ();
107+ }
108+
109+ defineExpose ({
110+ open: open ,
111+ close: close ,
112+ })
113+
101114 </script >
Original file line number Diff line number Diff line change 175175 { label: t (' Yes' ), value: true },
176176 { label: t (' No' ), value: false },
177177 ];
178- if (! column .required [props .mode ]) {
178+ if (! column .required [props .mode ] && ! column . isArray ?. enabled ) {
179179 options .push ({ label: t (' Unset' ), value: null });
180180 }
181181 return options ;
Original file line number Diff line number Diff line change @@ -276,7 +276,7 @@ const columnOptions = computedAsync(async () => {
276276 },
277277 });
278278
279- if (! column .required [props .source ]) list .items .push ({ value: null , label: column .foreignResource .unsetLabel });
279+ if (! column .required [props .source ] && ! column . isArray ? . enabled ) list .items .push ({ value: null , label: column .foreignResource .unsetLabel });
280280
281281 return { [column .name ]: list .items };
282282 }
You can’t perform that action at this time.
0 commit comments