8base / boost

8base UI kit

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Doing `openModal(ListingCreateDialog)` seems cleaner than `openModal(ListingCreateDialog.id)`

andr11111 opened this issue · comments

Is your feature request related to a problem? Please describe.
Why do we have openModal(ListingCreateDialog.id) instead of openModal(ListingCreateDialog)?

Describe the solution you'd like
It seems cleaner if we can do openModal(ListingCreateDialog) and extract id if needed inside the openModal function. Unless there is a strong reason we need to pass id.

!IMPORTANT!
Please implement in a backward-compatible manner such that it is still possible to do openModal(ListingCreateDialog.id)

@andrei-anisimov surely, openModal(ListingCreateDialog) looks like more clearly, but it can affect bugs, for example, any HoC around dialog component crash this code, it can confuse our users. In our cases, 99% dialogs already wrapped in HoCs.