Open huong-li-nguyen opened 2 months ago
Hi, I'd like to help here :)
Perfect - thank you! 👍
@bhavanaeh Did this issue make any progress? No worries if not, but it would be great to know so we can figure out if there's still something to be done here.
We still have some examples where an
id
is provided to a component even though it is not required.vizro-core/docs
andvizro-ai/docs
id
fromvm.Graph
,vm.Table
,vm.AgGrid
orvm.Card
if it is not requiredWhen is it not required?
The
id
is normally not required if that component is not the target of any kind of action e.g. filter_interaction, export, filters or parameters. A good rule of thumb is, if theid
appears only once in the entire app configuration, it's probably not required.Example of a redundant
id
provision (and the first example where you can remove it from the docs):In the first example the
id="scatter_chart"
is not required, because the Graph is not being targeted by any action. Also theid
only appears once in the entire app configuration. In the second example it is required though, because it is now the target of the Filter.Example where the
id
is required: