From 197175e334a3639803cb275d5890aafe9491ee20 Mon Sep 17 00:00:00 2001 From: Paul Bob <69730720+Paul-Bob@users.noreply.github.com> Date: Fri, 23 Aug 2024 14:35:34 +0300 Subject: [PATCH] more resource components (#283) --- docs/3.0/resources.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/docs/3.0/resources.md b/docs/3.0/resources.md index 24160ce4..bcc1d791 100644 --- a/docs/3.0/resources.md +++ b/docs/3.0/resources.md @@ -754,6 +754,23 @@ self.components = { } ``` + more components can be replaced. From this version, keys must be strings that match the original component with the exception of those from the snippet above. + +Here is a list of all the supported customizable components: + +```ruby +self.components = { + "Avo::Views::ResourceIndexComponent": Avo::Custom::ResourceIndexComponent, + "Avo::Views::ResourceShowComponent": "Avo::Custom::ResourceShowComponent", + "Avo::Views::ResourceEditComponent": "Avo::Custom::ResourceEditComponent", + "Avo::Index::GridItemComponent": "Avo::Custom::GridItemComponent", + "Avo::Index::ResourceMapComponent": "Avo::Custom::ResourceMapComponent", + "Avo::Index::ResourceTableComponent": "Avo::Custom::ResourceTableComponent", + "Avo::Index::TableRowComponent": "Avo::Custom::TableRowComponent" +} +``` + + A resource configured with the example above will start using the declared components instead the default ones. :::warning