Faker Controller is a Stimulus controller for user Faker.
These are standard HTML attributes (with no prefix) used by the controller.
| Attribute | Element(s) | Default | Value(s) | Description |
|---|---|---|---|---|
| aria-busy |
table |
false |
true false |
Table Filter will set this to true any time it is filtering the table. You can use the value in your CSS to indicate that work is in progress. |
All of these attributes are prefixed with "data-" in the attribute name.
| Attribute | Element(s) | Default | Value(s) | Description |
|---|---|---|---|---|
| controller |
(any) |
faker |
This attribute provides the controller functionality. |
All of these attributes are prefixed with "data-forcecheck-" in the attribute name.
| Attribute | Element(s) | Default | Value(s) | Description |
|---|---|---|---|---|
| locale |
(root) |
(string) |
The locale data to use for this instance. If an array is provided, the first locale that has a definition for a given property will be used. Please make sure that all required locales and their parent locales are present, e.g. [de_AT, de, en, base]. | |
| seed |
(root) |
(string) |
The seed to use for this instance. This is used to generate random values. If not provided, a random seed will be generated. | |
| html |
(*) |
(string) |
This sets the HTML of the element. See the Syntax section for more information. |
|
| text |
(*) |
(string) |
This sets the text of the element. See the Syntax section for more information. |
|
| value |
(*) |
(string) |
This sets the value of the element. See the Syntax section for more information. |
|
| attribute |
(*) |
(string) |
This sets an attribute on the element. See the Syntax section for more information. |
|
| recordset |
(*) |
(string) |
This is generated by the controller and is used to identify the recordset. This is used to identify the recordset in case the value of the "records" attribute changes and the controller needs to generate more records. |
name.firstNamename.lastNameaddress.cityaddress.stateaddress.zipCodeaddress.city:state=CAaddress.zipCode:state=CAaddress.zipCode:state=CA&country=USaddress.zipCode:state=CA&country=US&format=5number.bigInt:min=1&max=50000The attribute works the same as above, except that you must also indicate which attribute(s) to populate.
For example, if you want to set the "placeholder" attribute and the "data-mistletoe" attribute, you would use:
data-faker-attribute="placeholder=>phone.number"data-faker-attribute="data-mistletoe=>internet.email"data-faker-attribute="placeholder=>phone.number;data-mistletoe=>internet.email"These are custom events that the controller will fire when it takes certain actions.
All of these events are prefixed by "faker:".
| Event | Parameters | Description |
|---|---|---|
| initialized | Called any time that the controller is initialized. | |
| connected | Called any time that the controller is connected. | |
| disconnected | Called any time that the controller is disconnected. |