[Docs] Remove redundant provision of id
in docs examples
#713
Labels
Docs 🗒️
Issue for markdown and API documentation
Good first issue 🐤
Issue suitable for first-time contributors
hacktoberfest
A month-long celebration of all things open-source
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:The text was updated successfully, but these errors were encountered: